Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: #BBB-101 스터디 목록에서 기술서적 스터디의 책 제목 확인 가능 #22

Merged
merged 6 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions components/study/study-create-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ To read more about using these font, please visit the Next.js documentation:
- App Directory: https://nextjs.org/docs/app/building-your-application/optimizing/fonts
- Pages Directory: https://nextjs.org/docs/pages/building-your-application/optimizing/fonts
**/
import BookSearchModal from '@/components/book/book-search-modal';
import DifficultyLevelDialog from '@/components/study/difficulty-level-dialog';
import { TierIcon, getTierInfo } from '@/components/study/tier';
import { Button } from '@/components/ui/button/button';
Expand Down Expand Up @@ -49,6 +50,7 @@ import {
import registerAlgorithmStudy from '@/lib/api/study/create-algorithm-study';
import createBookStudy from '@/lib/api/study/create-book-study';
import { userState } from '@/recoil/userAtom';
import { changeBookInfoProps } from '@/types/book/book-result';
import {
RegisterAlgorithmStudyReq,
RegisterBookStudyReq,
Expand All @@ -63,8 +65,6 @@ import { FieldValues, useForm } from 'react-hook-form';
import { toast } from 'react-toastify';
import { useRecoilState } from 'recoil';
import { addDays } from './study-group';
import BookSearchModal from '@/components/book/book-search-modal';
import { changeBookInfoProps } from '@/types/book/book-result';

registerLocale('ko', Locales.ko);

Expand Down Expand Up @@ -414,7 +414,7 @@ export default function StudyCreateModal({
</div>

{studyType == StudyType.BOOK && (
<div className="grid grid-cols-2 mr-4">
<div className="grid grid-cols-1">
<div className="space-y-2">
<Label className="pl-1" htmlFor="book-search">
도서 검색
Expand Down
2 changes: 1 addition & 1 deletion components/study/study-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function BookStudyInfo(bookStudy: BookStudy) {
<div className="flex items-center gap-2 mb-4">
<BookIcon className="w-5 h-5 text-gray-500 dark:text-gray-400" />
<p className="text-gray-600 dark:text-gray-400">
{bookStudy.bookId} (TODO: 책제목으로 변경)
{bookStudy.bookInfo.title}
</p>
</div>
);
Expand Down
6 changes: 5 additions & 1 deletion types/study/study.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { BookResult } from '../book/book-result';
import { User } from '../user/user';

export interface Study {
id: number;
name: string;
Expand All @@ -6,6 +9,7 @@ export interface Study {
capacity: number;
weeks: number;
startDate: string;
leader: User;
reliabilityLimit: number;
penalty: number;
state: string;
Expand Down Expand Up @@ -35,7 +39,7 @@ export interface AlgorithmStudy extends Study {
}

export interface BookStudy extends Study {
bookId: number;
bookInfo: BookResult;
}

export interface StudyPage {
Expand Down
4 changes: 0 additions & 4 deletions types/user/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,4 @@ export interface User {
reliability: number;
money: number;
role: string;
reliabilityLimit: number;
penalty: number;
state: string;
studyType: string;
}
Loading