-
Notifications
You must be signed in to change notification settings - Fork 0
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
My page skeleton/#102 #103
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a0b56c0
feat: implement user credit result skeleton
gahyuun 2d24468
chore: add taken lecture table header info constant
gahyuun 43f53e8
feat: implement taken lecture skeleton
gahyuun 4dece06
feat: add suspense
gahyuun 88b339e
style: result container add padding props
gahyuun 638ecf1
remove: remove skeleton file atom -> util
gahyuun 1c91559
remove: remove lecture search result spinner
gahyuun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const TAKEN_LECTURE_TABLE_HEADER_INFO = ['์๊ฐ๋ ๋', '์๊ฐํ๊ธฐ', '๊ณผ๋ชฉ์ฝ๋', '๊ณผ๋ชฉ๋ช ', 'ํ์ ']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Skeleton from '../../view/atom/skeleton'; | ||
import { TableHeader } from '../../view/molecule/table/table-header'; | ||
import { TAKEN_LECTURE_TABLE_HEADER_INFO } from './taken-lecture-constant'; | ||
import TakenLectureLabel from './taken-lecture-label'; | ||
|
||
export default function TakenLectureSkeleton() { | ||
return ( | ||
<div className="flex flex-col gap-2.5 w-full"> | ||
<TakenLectureLabel /> | ||
<TableHeader headerInfo={TAKEN_LECTURE_TABLE_HEADER_INFO} cols={6} /> | ||
{Array.from({ length: 3 }).map((_, index) => ( | ||
<Skeleton key={index} className="rounded-xl w-full h-12" /> | ||
))} | ||
</div> | ||
); | ||
} |
6 changes: 6 additions & 0 deletions
6
app/ui/user/user-credit-result/user-credit-result-skeleton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import React from 'react'; | ||
import Skeleton from '../../view/atom/skeleton'; | ||
|
||
export default function UserCreditResultSkeleton() { | ||
return <Skeleton className="min-h-20 rounded-lg py-1 px-8 gap-3" />; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { cn } from '@/app/utils/shadcn/utils'; | ||
|
||
export default function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) { | ||
return <div className={cn('animate-pulse rounded-md bg-slate-100 dark:bg-slate-800', className)} {...props} />; | ||
return <div className={cn('animate-pulse rounded-md bg-gray-100', className)} {...props} />; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํ์ผ ๋ช ์ด ๊ธฐ์กด ๋ค์ด๋ฐ๊ณผ ์กฐ๊ธ ๋ค๋ฅธ ๊ฒ ๊ฐ์ต๋๋ค ํต์ผ์ด ํ์ํ ๊ฒ ๊ฐ์์
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ธฐ์กด ๋ค์ด๋ฐ์ด ์ด๋ค ๊ฑฐ ๋ง์ํ์๋ ์ง ์๋ ค์ฃผ์ค ์ ์๋์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
taken-lecture.skeleton.tsx
ํ์์ ์๋ฏธํ๋ ๊ฒ ์ ๋๋คThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ํ ๋ค๋ฅธ ๋ถ๋ค์ taken-lecture.skeleton.tsx ํ์์ผ๋ก ํ์ จ๋ค์! ์ด์ ๋ดค์ต๋๋ค ํน์ ๊ทธ๋ ๋ค๋ฉด .skeleton.tsx๋ก ๋ค์ด๋ฐ์ ์ง์ผ์ ์ด์ ๊ฐ ์์ผ์ค๊น์?? skeleton์ atom ๊ณตํต ์ปดํฌ๋ํธ์ธ๋ฐ .business.ts๋ .type.ts ์ฒ๋ผ ๋ค์ด๋ฐ์ ์ง์ ํ์๊ฐ ์๋ ์ถ๋ค์! ์ ํฌ๊ฐ result.dialog.tsx๋ก ๋ค์ด๋ฐ์ ์ง์ง ์๊ณ result-dialog.tsx ๋ก ์ง๋ ๊ฒ์ฒ๋ผ์!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ ๋ ๊ธฐ๋ณธ์ ์ผ๋ก ๋ค์ด๋ฐ์ ์ ํฌ ํ ์์์๋ง ํฉ์๋๋ฉด ๋๋ ๋ถ๋ถ์ด๋ผ๊ณ ์๊ฐ์ ํ๋๋ฐ์. ์ ๊ฐ skeleton์ ๊ฐ๋ฐํ ๋น์์๋ ์ด๋ฏธ ํด๋น ๋ค์ด๋ฐ์ผ๋ก ์ฌ์ฉ๋๊ณ ์์์ผ๋ฉฐ, ํด๋น ๋ค์ด๋ฐ ๋ณ๋๋ก ๋ถ์์ฐ์ค๋ฝ๋ค๋ ์๊ฐ์ ํ์ง ์์์ ์ ๋ ๋์ผํ๊ฒ ์ฌ์ฉํ ๊ฒ์ผ๋ก ๊ธฐ์ต์ด ๋ฉ๋๋ค. ํด์ ์ฑํ ์ ๋ฐฐ์ ์๊ฒฌ๋ ๊ถ๊ธํ๋ค์.
์ ๊ฐ ๋ถ์์ฐ์ค๋ฝ๋ค๊ณ ์๊ฐํ์ง ์์๋ ์ด์ ๋ taken-lecture์ skeleton์ ํด๋น ์ปดํฌ๋ํธ๊ฐ ํํํ๊ธฐ ๋๋ฌธ์ ๋๋ค. taken-lecture์ storybook์ taken-lecture.storiesํ๊ธฐ๋ฒ์ผ๋ก ์์ฑํ๋ฏ taken-lecture์ ๋ํ skeleton component๋ผ๊ณ ์๊ฐํด์ ํด๋น ๋ค์ด๋ฐ์ด ์์ฐ์ค๋ฝ๊ฒ ์๋ฟ์๋ ๊ฒ ๊ฐ๋ค์.
result-dialog.tsx์ result์ dialog๋ก์์ ์๋ฏธ๋ณด๋ค๋ content๋ฅผ ๋ด๋นํ๋ component์ด๊ธฐ ๋๋ฌธ์ ๋์ผํ ๋์์ผ๋ก ๋ณด๊ธฐ๋ ์ด๋ ต๋ค๋ ์๊ฐ์ด ๋๋๋ฐ, ์ด๋ป๊ฒ ์๊ฐํ์๋์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ ๋ skeleton์ ๋จ์ํ ์ปดํฌ๋ํธ๋ก๋ง ๋ณด๊ณ , ์ธ๋๋ skeleton์ storybook, business, command ์ฒ๋ผ ์ด๋ค ๊ฒ์ ํํํ๊ธฐ ์ํ ์ข ๋ฅ๋ ๊ธฐ๋ฅ์ด๋ผ๊ณ ์๊ฐํ๋ ๊ฒ ๊ฐ๋ค์!
dialog๊ฐ dialog ์์ฒด์ ์ญํ ์ ๊ฐํ์ง ์์๋ฐ ์ด์ ๋นํด skeleton์ skeleton ์์ฒด ์ญํ ์ด ๊ฐํ๋ค๋ ๋ง์ ์ ๋ ๋์ํฉ๋๋ค! ๊ทธ๋ฌํ ์ด์ ๋ก .skeleton.tsx๋ฅผ ์ฌ์ฉํ ๊ฑฐ๋ผ๋ฉด atom ํด๋๊ฐ ์๋ util ํด๋๊ฐ ์ข ๋ ์ ํฉํ์ง ์์๊นํ๋ค์ ์ด์ ๋ํด์๋ ํน์ ์ด๋ป๊ฒ ์๊ฐํ์๋์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ธฐ์กด์ Skeleton atom component๊ฐ util ํด๋๋ก์ ์ด๋์ ํตํด์ ๋๊ตฌ์ ์ฐจ์์ ์๋ฏธ๋ฅผ ๋ ๊ฐํ๊ฒ ๋ํ๋ผ ์ ์๋ ๊ฒ ๊ฐ๋ค๋ ์๊ฐ์ด ๋๋ค์. ์ข์ต๋๋ค.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
638ecf1
๋ฐ์ํ์ต๋๋ค