diff --git a/src/components/ProfilePic.tsx b/src/components/ProfilePic.tsx index 757be58..e6f8b74 100644 --- a/src/components/ProfilePic.tsx +++ b/src/components/ProfilePic.tsx @@ -1,36 +1,23 @@ import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'; import { User } from '@/types/User'; -import { - Tooltip, - TooltipContent, - TooltipProvider, - TooltipTrigger, -} from '@/components/ui/tooltip'; +import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'; import { CardType } from '@/types/enums'; -export default function ProfilePic({ - user, - type, -}: { - user: User; - type: CardType; -}) { +export default function ProfilePic({ user, type }: { user: User; type: CardType }) { return ( { if (type !== 'searchedCard') { - window.open( - `https://profile.intra.42.fr/users/${user.intraId}`, - ); + window.open(`https://profile.intra.42.fr/users/${user.intraId}`); } }} > @@ -38,9 +25,7 @@ export default function ProfilePic({ - {type !== 'searchedCard' && ( - 인트라 프로필 방문 - )} + {type !== 'searchedCard' && 인트라 프로필 방문} ); diff --git a/src/components/admin/AnnouncementMenu.tsx b/src/components/admin/AnnouncementMenu.tsx index 06a4d3a..9cae5c9 100644 --- a/src/components/admin/AnnouncementMenu.tsx +++ b/src/components/admin/AnnouncementMenu.tsx @@ -17,7 +17,7 @@ export default function AnnouncementMenu({ return ( -

+

종류: {type}

diff --git a/src/components/announcement/SurveyLink.tsx b/src/components/announcement/SurveyLink.tsx index fd70fb4..6977035 100644 --- a/src/components/announcement/SurveyLink.tsx +++ b/src/components/announcement/SurveyLink.tsx @@ -30,7 +30,7 @@ export default function SurveyLink({ 🏃 설문조사 참여하기 🏃 diff --git a/src/components/buttons/GroupSettingBtn.tsx b/src/components/buttons/GroupSettingBtn.tsx index 28d99a0..9fe52e1 100644 --- a/src/components/buttons/GroupSettingBtn.tsx +++ b/src/components/buttons/GroupSettingBtn.tsx @@ -1,11 +1,6 @@ import Group from '@/types/Group'; import Image from 'next/image'; -import { - Tooltip, - TooltipContent, - TooltipProvider, - TooltipTrigger, -} from '@/components/ui/tooltip'; +import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'; import { DropdownMenuTrigger } from '@/components/ui/dropdown-menu'; export default function GroupSettingBtn({ @@ -17,16 +12,14 @@ export default function GroupSettingBtn({ }) { return ( !groups.find((group) => group.groupId === curGroup.groupId)?.isInEdit && ( - + - pencil + pencil 그룹 설정 diff --git a/src/components/buttons/MySettingBtn.tsx b/src/components/buttons/MySettingBtn.tsx index 75f966c..2d0235a 100644 --- a/src/components/buttons/MySettingBtn.tsx +++ b/src/components/buttons/MySettingBtn.tsx @@ -1,10 +1,5 @@ import Image from 'next/image'; -import { - Tooltip, - TooltipContent, - TooltipProvider, - TooltipTrigger, -} from '@/components/ui/tooltip'; +import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'; export default function MySettingBtn() { return ( @@ -16,7 +11,7 @@ export default function MySettingBtn() { alt="setting" width={60} height={60} - className="size-[50px] cursor-pointer rounded-lg hover:bg-gray-200 lg:size-[60px]" + className="size-[40px] cursor-pointer rounded-lg hover:bg-gray-200 lg:size-[60px]" /> 내 정보 설정 diff --git a/src/components/buttons/SetCheckBtn.tsx b/src/components/buttons/SetCheckBtn.tsx index 3130a13..19977d3 100644 --- a/src/components/buttons/SetCheckBtn.tsx +++ b/src/components/buttons/SetCheckBtn.tsx @@ -16,15 +16,15 @@ export default function SetCheckBtn() { return ( ); diff --git a/src/components/buttons/XBtn.tsx b/src/components/buttons/XBtn.tsx new file mode 100644 index 0000000..416077d --- /dev/null +++ b/src/components/buttons/XBtn.tsx @@ -0,0 +1,5 @@ +import { X } from 'lucide-react'; + +export default function XBtn({ onClick }: { onClick: () => void }) { + return ; +} diff --git a/src/components/cards/MyProfileCard.tsx b/src/components/cards/MyProfileCard.tsx index e586b98..fcf646b 100644 --- a/src/components/cards/MyProfileCard.tsx +++ b/src/components/cards/MyProfileCard.tsx @@ -8,16 +8,14 @@ import SetCheckBtn from '@/components/buttons/SetCheckBtn'; export default function MyProfileCard({ user }: { user: User }) { return ( -
+
-
+
-

- {user.intraName} -

-

{user.comment}

+

{user.intraName}

+

{user.comment}

diff --git a/src/components/cards/ProfileCard.tsx b/src/components/cards/ProfileCard.tsx index e004726..714f84f 100644 --- a/src/components/cards/ProfileCard.tsx +++ b/src/components/cards/ProfileCard.tsx @@ -30,17 +30,17 @@ export default function ProfileCard({ return (
- {!addedMembers.find( - (a) => a === member.intraId, - ) && } + {!addedMembers.find((a) => a === member.intraId) && } ); } diff --git a/src/components/group/GroupCardContainer.tsx b/src/components/group/GroupCardContainer.tsx index 0520a96..6761578 100644 --- a/src/components/group/GroupCardContainer.tsx +++ b/src/components/group/GroupCardContainer.tsx @@ -8,7 +8,7 @@ export default function GroupCardContainer({ curGroup }: { curGroup: Group }) { return ( <> -
+
{curGroup.members.map( (member) => (!checked || member.inCluster) && ( @@ -23,9 +23,8 @@ export default function GroupCardContainer({ curGroup }: { curGroup: Group }) { )}
{(curGroup.members.length === 0 || - (checked && - !curGroup.members.filter((member) => member.inCluster).length)) && ( -

아무도 없어요.. 😢

+ (checked && !curGroup.members.filter((member) => member.inCluster).length)) && ( +

아무도 없어요.. 😢

)} ); diff --git a/src/components/group/GroupEditBar.tsx b/src/components/group/GroupEditBar.tsx index 8fb3904..4cbb960 100644 --- a/src/components/group/GroupEditBar.tsx +++ b/src/components/group/GroupEditBar.tsx @@ -4,13 +4,7 @@ import { Button } from '@/components/ui/button'; import GroupDeleteModal from '@/components/modals/GroupDeleteModal'; import GroupAddModal from '@/components/modals/GroupAddModal'; -export default function GroupEditBar({ - groups, - curGroup, -}: { - groups: Group[]; - curGroup: Group; -}) { +export default function GroupEditBar({ groups, curGroup }: { groups: Group[]; curGroup: Group }) { const { setGroups } = useGroupsStore(); const { checkedUsers, setCheckedUsers } = useCheckedUsersStore(); return ( @@ -23,8 +17,8 @@ export default function GroupEditBar({ )}
diff --git a/src/components/modals/GroupDeleteModal.tsx b/src/components/modals/GroupDeleteModal.tsx index 6ae72d3..c3f51cb 100644 --- a/src/components/modals/GroupDeleteModal.tsx +++ b/src/components/modals/GroupDeleteModal.tsx @@ -52,8 +52,8 @@ export default function GroupDeleteModal({ curGroup }: { curGroup: Group }) { diff --git a/src/components/modals/GroupSettingModal.tsx b/src/components/modals/GroupSettingModal.tsx index 96945f9..ff46c01 100644 --- a/src/components/modals/GroupSettingModal.tsx +++ b/src/components/modals/GroupSettingModal.tsx @@ -1,5 +1,4 @@ import { useState, useRef, FormEvent } from 'react'; -import { X } from 'lucide-react'; import { DialogTrigger } from '@radix-ui/react-dialog'; import { Dialog, DialogContent, DialogTitle, DialogClose } from '@/components/ui/dialog'; import groupApi from '@/api/groupApi'; @@ -9,6 +8,7 @@ import { Button } from '@/components/ui/button'; import Group from '@/types/Group'; import { useToast } from '@/components/ui/use-toast'; import GroupSettingBtn from '@/components/buttons/GroupSettingBtn'; +import XBtn from '@/components/buttons/XBtn'; export default function GroupSettingModal({ curGroup }: { curGroup: Group }) { const [isDelete, setIsDelete] = useState(false); @@ -88,22 +88,22 @@ export default function GroupSettingModal({ curGroup }: { curGroup: Group }) { openHandler(open)}> - + {curGroup.members.length > 0 && ( - editClickHandler()}> + editClickHandler()}> 그룹 수정 )} {defalutGroupId !== curGroup.groupId && ( <> - setIsDelete(false)}> + setIsDelete(false)}> 그룹명 수정 setIsDelete(true)} > 그룹 삭제 @@ -153,8 +153,7 @@ export default function GroupSettingModal({ curGroup }: { curGroup: Group }) { /> {groupName && ( - { formRef.current?.reset(); setGroupName(''); diff --git a/src/components/modals/MySettingModal.tsx b/src/components/modals/MySettingModal.tsx index d42290a..7466202 100644 --- a/src/components/modals/MySettingModal.tsx +++ b/src/components/modals/MySettingModal.tsx @@ -1,22 +1,18 @@ import { useState, useRef, FormEvent } from 'react'; -import { X } from 'lucide-react'; import { DialogTrigger } from '@radix-ui/react-dialog'; import { DropdownMenuTrigger } from '@radix-ui/react-dropdown-menu'; -import { - Dialog, - DialogContent, - DialogHeader, - DialogTitle, -} from '@/components/ui/dialog'; +import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog'; import memberApi from '@/api/memberApi'; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, + DropdownMenuSeparator, } from '@/components/ui/dropdown-menu'; import { useUserStore } from '@/lib/stores'; import CustomLocationContent from '@/components/utils/CustomLocationContent'; import SettingBtn from '@/components/buttons/MySettingBtn'; +import XBtn from '@/components/buttons/XBtn'; export default function MySettingModal() { const [isMessage, setIsMessage] = useState(false); @@ -80,14 +76,11 @@ export default function MySettingModal() { setIsMessage(true)}> - - 상태 메시지 수정 - + 상태 메시지 수정 + setIsMessage(false)}> - - 수동 위치 설정 - + 수동 위치 설정 @@ -115,8 +108,7 @@ export default function MySettingModal() { {searchValue.length}/15

{searchValue && ( - { formRef.current?.reset(); setSearchValue(''); @@ -128,10 +120,7 @@ export default function MySettingModal() { ) : ( - + )}
); diff --git a/src/components/modals/NewGroupModal.tsx b/src/components/modals/NewGroupModal.tsx index 85c3cbd..ba29f65 100644 --- a/src/components/modals/NewGroupModal.tsx +++ b/src/components/modals/NewGroupModal.tsx @@ -1,5 +1,4 @@ import { useState, useRef, useEffect, FormEvent } from 'react'; -import { X } from 'lucide-react'; import Image from 'next/image'; import { Button } from '@/components/ui/button'; import { @@ -25,6 +24,7 @@ import Group from '@/types/Group'; import { useToast } from '@/components/ui/use-toast'; import { SearchedUser, User } from '@/types/User'; import SearchedCard from '@/components/cards/SearchedCard'; +import XBtn from '@/components/buttons/XBtn'; export default function NewGroupModal() { const { groups, setGroups } = useGroupsStore(); @@ -165,8 +165,8 @@ export default function NewGroupModal() { openHandler(open)}> @@ -212,8 +212,7 @@ export default function NewGroupModal() { className="flex flex-row items-center gap-2 rounded-xl border border-gray-400 p-2 shadow-lg" >

{selectedUser.intraName}

- { setSelectedUsers( selectedUsers.filter((selected) => selected !== selectedUser), @@ -233,8 +232,7 @@ export default function NewGroupModal() { onChange={(e) => setSearchValue(e.target.value)} /> {searchValue && ( - { formRef.current?.reset(); setSearchValue(''); @@ -250,6 +248,9 @@ export default function NewGroupModal() { member={searchedMember as SearchedUser} onClick={() => clickSearchedUserHandler(searchedMember as SearchedUser)} isAddingUser + isAlreadyAdded={selectedUsers.some( + (selectedUser) => selectedUser.intraId === searchedMember.intraId, + )} /> ))}
@@ -277,8 +278,7 @@ export default function NewGroupModal() { /> {searchValue && ( - { formRef.current?.reset(); setSearchValue(''); diff --git a/src/components/modals/SearchModal.tsx b/src/components/modals/SearchModal.tsx index e760842..8158c53 100644 --- a/src/components/modals/SearchModal.tsx +++ b/src/components/modals/SearchModal.tsx @@ -1,6 +1,5 @@ import { useState, useRef, FormEvent } from 'react'; import Image from 'next/image'; -import { X } from 'lucide-react'; import { z } from 'zod'; import SearchedCard from '@/components/cards/SearchedCard'; import SearchBtn from '@/components/buttons/SearchBtn'; @@ -14,6 +13,7 @@ import { import memberApi from '@/api/memberApi'; import { useUserStore } from '@/lib/stores'; import { SearchedUser } from '@/types/User'; +import XBtn from '@/components/buttons/XBtn'; const SearchInputSchema = z.string().regex(/^[a-zA-Z0-9-]*$/, { message: '영어, 숫자, -만 입력 가능합니다.', @@ -111,8 +111,7 @@ export default function SearchModal() { /> {searchValue && ( - { formRef.current?.reset(); setSearchValue(''); @@ -124,7 +123,7 @@ export default function SearchModal() { {/* eslint-disable-next-line no-nested-ternary */} {searchedUsers?.length ? ( searchedUsers?.length > 4 ? ( -
+
{searchedUsers?.map((searchedMember) => ( diff --git a/src/components/modals/UserSettingModal.tsx b/src/components/modals/UserSettingModal.tsx index 85e7bf4..1e27221 100644 --- a/src/components/modals/UserSettingModal.tsx +++ b/src/components/modals/UserSettingModal.tsx @@ -1,9 +1,19 @@ import { useState } from 'react'; -import { DialogTrigger } from '@radix-ui/react-dialog'; +import { + DialogTrigger, + Dialog, + DialogContent, + DialogTitle, + DialogClose, +} from '@/components/ui/dialog'; import Image from 'next/image'; -import { DropdownMenuTrigger } from '@radix-ui/react-dropdown-menu'; -import { Dialog, DialogContent, DialogTitle, DialogClose } from '@/components/ui/dialog'; -import { DropdownMenu, DropdownMenuContent, DropdownMenuItem } from '@/components/ui/dropdown-menu'; +import { + DropdownMenuSeparator, + DropdownMenuTrigger, + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, +} from '@/components/ui/dropdown-menu'; import { useGroupsStore, useUserStore, @@ -113,13 +123,17 @@ export default function UserSettingModal({ setIsDelete(false)}> - 다른 그룹에 추가하기 + 다른 그룹에 추가하기 - selectClickHandler()}> + + selectClickHandler()}> 유저 선택하기 + setIsDelete(true)}> - 그룹에서 삭제하기 + + 그룹에서 삭제하기 + @@ -167,12 +181,12 @@ export default function UserSettingModal({

" {targUser.intraName} - " + "{' '}

님을

- " - {targGroup.groupName} + {' '} + "{targGroup.groupName} "{' '}

그룹으로부터 삭제하시겠습니까? diff --git a/src/components/utils/CustomLocationContent.tsx b/src/components/utils/CustomLocationContent.tsx index 9e524db..ca3c6a4 100644 --- a/src/components/utils/CustomLocationContent.tsx +++ b/src/components/utils/CustomLocationContent.tsx @@ -46,7 +46,7 @@ export default function CustomLocationContent({ className="flex min-h-[300px] max-w-[550px] flex-col items-center justify-center transition-all duration-500 ease-out" > -

+

수동 위치 설정은 클러스터 안에 있을 때만 가능해요 😢

diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 8d9b9e9..2315259 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -27,7 +27,7 @@ export default function Home() { return ( <> -
+
{user ? : } diff --git a/src/styles/globals.css b/src/styles/globals.css index 7de8050..c0c4563 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -53,6 +53,7 @@ --ring: 240 10% 3.9%; --darkblue: 215 56% 17%; --baseblue: 214 27.5% 40%; + --basepink: 0 100% 85.5%; --radius: 0.5rem; } diff --git a/src/types/CascaderOption.ts b/src/types/CascaderOption.ts index b4c168c..bcea3ca 100644 --- a/src/types/CascaderOption.ts +++ b/src/types/CascaderOption.ts @@ -25,7 +25,7 @@ export const DefaultCustomLocation: CascaderOption = { value: '2층', children: [ { - label: '1클러스터', + label: 'C1', value: 'c1', children: [ { label: '회의실', value: '회의실' }, @@ -34,7 +34,7 @@ export const DefaultCustomLocation: CascaderOption = { ], }, { - label: '2클러스터', + label: 'C2', value: 'c2', children: [ { label: '테이블', value: '테이블' }, @@ -48,7 +48,7 @@ export const DefaultCustomLocation: CascaderOption = { value: '3층', children: [ { - label: 'x1클러스터', + label: 'CX1', value: 'cx1', children: [ { label: '회의실', value: '회의실' }, @@ -57,7 +57,7 @@ export const DefaultCustomLocation: CascaderOption = { ], }, { - label: 'x2클러스터', + label: 'CX2', value: 'cx2', children: [ { label: '테이블', value: '테이블' }, @@ -71,7 +71,7 @@ export const DefaultCustomLocation: CascaderOption = { value: '4층', children: [ { - label: '3클러스터', + label: 'C3', value: 'c3', children: [ { label: '회의실', value: '회의실' }, @@ -80,7 +80,7 @@ export const DefaultCustomLocation: CascaderOption = { ], }, { - label: '4클러스터', + label: 'C4', value: 'c4', children: [ { label: '테이블', value: '테이블' }, @@ -94,7 +94,7 @@ export const DefaultCustomLocation: CascaderOption = { value: '5층', children: [ { - label: '5클러스터', + label: 'C5', value: 'c5', children: [ { label: '집현전', value: '집현전' }, @@ -103,7 +103,7 @@ export const DefaultCustomLocation: CascaderOption = { ], }, { - label: '6클러스터', + label: 'C6', value: '개포 5층 c6', children: [ { label: '테이블', value: '개포 5층 c6 테이블' }, diff --git a/tailwind.config.ts b/tailwind.config.ts index fb2f85c..af0da85 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -18,6 +18,7 @@ const config = { air: '1400px', '2xl': '1536px', '3xl': '1600px', + '4xl': '1800px', }, container: { center: true, @@ -37,6 +38,7 @@ const config = { foreground: 'hsl(var(--foreground))', darkblue: 'hsl(var(--darkblue))', baseblue: 'hsl(var(--baseblue))', + basepink: 'hsl(var(--basepink))', primary: { DEFAULT: 'hsl(var(--primary))', foreground: 'hsl(var(--primary-foreground))',