From c30e2f4fe6a75c719de2637e0272f014d3f83c34 Mon Sep 17 00:00:00 2001 From: LSJ Date: Sat, 16 Nov 2024 21:46:24 +0900 Subject: [PATCH] perf --- components/atoms/Avatar.tsx | 6 +- components/atoms/BasicAvatar.tsx | 2 +- components/atoms/InfoCard.tsx | 2 +- components/molecules/OrganizerBar.tsx | 1 + components/molecules/ProfileDetailBlock.tsx | 8 +- components/molecules/UserComment.tsx | 1 + components/molecules/UserCommentInput.tsx | 1 + components/molecules/UserItem.tsx | 8 +- .../molecules/cards/ProfileCommentCard.tsx | 8 +- .../molecules/groups/InviteUserGroups.tsx | 8 +- components/molecules/headers/FeedHeader.tsx | 8 +- .../imageSliderType/ImageSliderMember.tsx | 8 +- design/attendance/AttendanceBar.tsx | 97 ---------- design/attendance/AttendanceModal.tsx | 165 ------------------ hooks/groupStudy/queries.ts | 12 +- hooks/user/queries.ts | 6 +- modals/RecentJoinUserPopUp.tsx | 2 +- modals/pop-up/LastWeekAttendPopUp.tsx | 1 + modals/profile/ProfileCardModal.tsx | 1 + .../gather/detail/GatherParticipation.tsx | 18 +- pageTemplates/group/GroupMine.tsx | 2 - pageTemplates/group/detail/GroupOrganizer.tsx | 7 +- pageTemplates/member/MemberMyProfile.tsx | 1 + pageTemplates/notice/NoticeChat.tsx | 1 + pageTemplates/profile/DetailInfo.tsx | 46 +++-- .../profile/profileOverview/ProfileInfo.tsx | 8 +- pageTemplates/ranking/RankingMembers.tsx | 1 + pageTemplates/ranking/RankingOverview.tsx | 1 + .../user/userOverview/UserOverView.tsx | 1 + pages/chat/[uid].tsx | 1 + pages/designs/studyAttendance.tsx | 24 --- pages/member/[location]/[category].tsx | 8 +- pages/member/[location]/detail.tsx | 8 +- pages/profile/[userId].tsx | 30 ++-- pages/user/alphabet.tsx | 1 + stories/designs/attendanceModal.stories.ts | 26 --- 36 files changed, 139 insertions(+), 390 deletions(-) delete mode 100644 design/attendance/AttendanceBar.tsx delete mode 100644 design/attendance/AttendanceModal.tsx delete mode 100644 pages/designs/studyAttendance.tsx delete mode 100644 stories/designs/attendanceModal.stories.ts diff --git a/components/atoms/Avatar.tsx b/components/atoms/Avatar.tsx index 3ee657168..99171739e 100644 --- a/components/atoms/Avatar.tsx +++ b/components/atoms/Avatar.tsx @@ -16,6 +16,7 @@ interface IAvatar { sizeLength?: number; avatar?: IAvatarProp; uid?: string; + userId?: string; isPriority?: boolean; shadowAvatar?: number; isLink?: boolean; @@ -28,6 +29,7 @@ function AvatarComponent({ avatar, uid, isPriority, + userId, shadowAvatar, isLink = true, }: IAvatar) { @@ -128,12 +130,12 @@ function AvatarComponent({ return ( <> - {!isLink ? ( + {!isLink || !userId ? ( ) : ( - + )} diff --git a/components/atoms/BasicAvatar.tsx b/components/atoms/BasicAvatar.tsx index 690979025..2f992c60b 100644 --- a/components/atoms/BasicAvatar.tsx +++ b/components/atoms/BasicAvatar.tsx @@ -12,7 +12,7 @@ function BasicAvatar() { return ( - + ); } diff --git a/components/atoms/InfoCard.tsx b/components/atoms/InfoCard.tsx index d79343d8b..c011440f9 100644 --- a/components/atoms/InfoCard.tsx +++ b/components/atoms/InfoCard.tsx @@ -25,7 +25,7 @@ export default function InfoCard({ return ( {leftComponent && {leftComponent}} - + {name} diff --git a/components/molecules/OrganizerBar.tsx b/components/molecules/OrganizerBar.tsx index c1abe0e68..e040aec9a 100644 --- a/components/molecules/OrganizerBar.tsx +++ b/components/molecules/OrganizerBar.tsx @@ -24,6 +24,7 @@ function OrganizerBar({ organizer, createdAt, children, isAdminOpen }: Organizer ) : ( - + {user.name} diff --git a/components/molecules/UserComment.tsx b/components/molecules/UserComment.tsx index 02c782139..d91665e41 100644 --- a/components/molecules/UserComment.tsx +++ b/components/molecules/UserComment.tsx @@ -144,6 +144,7 @@ function UserComment({ onClickProfile(user)}> - + {user?.name}
{user.comment}
diff --git a/components/molecules/cards/ProfileCommentCard.tsx b/components/molecules/cards/ProfileCommentCard.tsx index 377370ab7..e547945a1 100644 --- a/components/molecules/cards/ProfileCommentCard.tsx +++ b/components/molecules/cards/ProfileCommentCard.tsx @@ -52,7 +52,13 @@ export default function ProfileCommentCard({ {leftComponent && {leftComponent}} {user ? ( - + ) : ( )} diff --git a/components/molecules/groups/InviteUserGroups.tsx b/components/molecules/groups/InviteUserGroups.tsx index a3e830842..91a4fb990 100644 --- a/components/molecules/groups/InviteUserGroups.tsx +++ b/components/molecules/groups/InviteUserGroups.tsx @@ -13,7 +13,13 @@ export default function InviteUserGroups({ users, inviteUser }: IInviteUserGroup {users?.map((who, idx) => ( - + {who.name} @@ -73,14 +71,14 @@ function ProfilePage() { - + {isDeclare && ( { - router.replace(`/profile/${uid}`); + router.replace(`/profile/${userId}`); }} setDeclareModal={setDeclareModal} /> diff --git a/pages/user/alphabet.tsx b/pages/user/alphabet.tsx index c152320b2..913002d40 100644 --- a/pages/user/alphabet.tsx +++ b/pages/user/alphabet.tsx @@ -126,6 +126,7 @@ function CollectionAlphabet() { onClickProfile(user)}> ; - -export default meta; -type Story = StoryObj; - -export const Primary: Story = { - args: { - type: 1, - }, -}; -export const Secondary: Story = { - args: { - type: 2, - }, -};