From 43bd16a21286f719cdbc23af9b36a73640213410 Mon Sep 17 00:00:00 2001 From: Brokyeom Date: Thu, 7 Mar 2024 21:29:41 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat=20:=2034=EA=B8=B0=20=EC=8B=9C=EC=9E=91?= =?UTF-8?q?=20=EB=8C=80=EB=B9=84=20=ED=99=9C=EB=8F=99=EA=B8=B0=EC=88=98=20?= =?UTF-8?q?=EA=B0=92=2034=EA=B8=B0=EB=A1=9C=20=EB=B3=80=EA=B2=BD,=20?= =?UTF-8?q?=EB=84=A4=EB=B9=84=EA=B2=8C=EC=9D=B4=EC=85=98=EC=97=90=2034?= =?UTF-8?q?=EA=B8=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/icons/SoptLogos/NowSoptLogo.svg | 10 ++++++++++ src/assets/icons/SoptLogos/index.ts | 1 + src/components/common/Nav/GenerationDropDown/index.tsx | 6 +++--- src/components/common/Nav/GenerationDropDown/style.ts | 4 ++++ src/pages/attendanceAdmin/session/[id].tsx | 4 ++-- src/recoil/atom.ts | 2 +- src/utils/generation.ts | 4 ++-- src/utils/nav.ts | 7 ++++++- 8 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 src/assets/icons/SoptLogos/NowSoptLogo.svg diff --git a/src/assets/icons/SoptLogos/NowSoptLogo.svg b/src/assets/icons/SoptLogos/NowSoptLogo.svg new file mode 100644 index 00000000..95312a70 --- /dev/null +++ b/src/assets/icons/SoptLogos/NowSoptLogo.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/assets/icons/SoptLogos/index.ts b/src/assets/icons/SoptLogos/index.ts index 78400f8d..e5beec70 100644 --- a/src/assets/icons/SoptLogos/index.ts +++ b/src/assets/icons/SoptLogos/index.ts @@ -1,3 +1,4 @@ export { default as DoSoptLogo } from './DoSoptLogo.svg'; export { default as GoSoptLogo } from './GoSoptLogo.svg'; +export { default as NowSoptLogo } from './NowSoptLogo.svg'; export { default as SoptMainLogo } from './SoptMainLogo.svg'; diff --git a/src/components/common/Nav/GenerationDropDown/index.tsx b/src/components/common/Nav/GenerationDropDown/index.tsx index 30bf7b03..d89b24d3 100644 --- a/src/components/common/Nav/GenerationDropDown/index.tsx +++ b/src/components/common/Nav/GenerationDropDown/index.tsx @@ -3,7 +3,7 @@ import { useRouter } from 'next/router'; import { useState } from 'react'; import { IcNewDropdown } from '@/assets/icons'; -import { DoSoptLogo } from '@/assets/icons/SoptLogos'; +import { NowSoptLogo } from '@/assets/icons/SoptLogos'; import { useRecoilGenerationSSR } from '@/hooks/useRecoilGenerationSSR'; import { GENERATION_INFO } from '@/utils/nav'; @@ -21,8 +21,8 @@ function GenerationDropDown() { const [isDropdownOn, setIsDropdownOn] = useState(false); const [selectedGenerationInfo, setSelectedGenerationInfo] = useState({ - logo: , - slogan: 'DO', + logo: , + slogan: GENERATION_INFO[0].slogan, }); const handleSelectedGeneration = ( diff --git a/src/components/common/Nav/GenerationDropDown/style.ts b/src/components/common/Nav/GenerationDropDown/style.ts index 5c3a6a38..764916a2 100644 --- a/src/components/common/Nav/GenerationDropDown/style.ts +++ b/src/components/common/Nav/GenerationDropDown/style.ts @@ -41,6 +41,10 @@ export const StSelectedGeneration = styled(GenerationContainer)` &:active { background-color: ${colors.gray700}; } + + & > svg > path > fill { + border-radius: 0.7rem; + } `; export const StDropdownGeneration = styled(GenerationContainer)` diff --git a/src/pages/attendanceAdmin/session/[id].tsx b/src/pages/attendanceAdmin/session/[id].tsx index e98ed8c4..ab613336 100644 --- a/src/pages/attendanceAdmin/session/[id].tsx +++ b/src/pages/attendanceAdmin/session/[id].tsx @@ -98,7 +98,7 @@ function SessionDetailPage() { ? prevStatus.secondRoundStatus : prevStatus.firstRoundStatus : (attendances.find((attendance) => attendance.round === anotherRound) - ?.status as ATTEND_STATUS); + ?.status as ATTEND_STATUS); const firstRoundStatus = round === 1 ? status : anotherRoundStatus; const secondRoundStatus = round === 2 ? status : anotherRoundStatus; @@ -246,7 +246,7 @@ function SessionDetailPage() { return () => closeAttendance(); default: // eslint-disable-next-line prettier/prettier - return () => { }; + return () => {}; } }; diff --git a/src/recoil/atom.ts b/src/recoil/atom.ts index 441190af..f0ebcde2 100644 --- a/src/recoil/atom.ts +++ b/src/recoil/atom.ts @@ -11,6 +11,6 @@ const { persistAtom } = recoilPersist({ export const currentGenerationState = atom({ key: 'currentGenerationState', - default: '33', + default: '34', effects_UNSTABLE: [persistAtom], }); diff --git a/src/utils/generation.ts b/src/utils/generation.ts index ba145b37..6196d679 100644 --- a/src/utils/generation.ts +++ b/src/utils/generation.ts @@ -1,3 +1,3 @@ -export const ACTIVITY_GENERATION: string = '33'; +export const ACTIVITY_GENERATION: string = '34'; -export const GENERATION_LIST: string[] = ['33', '32']; +export const GENERATION_LIST: string[] = ['34', '33', '32']; diff --git a/src/utils/nav.ts b/src/utils/nav.ts index c866b6b2..35017493 100644 --- a/src/utils/nav.ts +++ b/src/utils/nav.ts @@ -1,7 +1,12 @@ import { IcAlarmMenu, IcAttendanceMenu, IcOrgMenu } from '@/assets/icons'; -import { DoSoptLogo, GoSoptLogo } from '@/assets/icons/SoptLogos'; +import { DoSoptLogo, GoSoptLogo, NowSoptLogo } from '@/assets/icons/SoptLogos'; export const GENERATION_INFO = [ + { + generation: '34', + Logo: NowSoptLogo, + slogan: 'NOW', + }, { generation: '33', Logo: DoSoptLogo, From 5b1d6444beaf836e2bd4247c59719f0d8cbaccb2 Mon Sep 17 00:00:00 2001 From: Brokyeom Date: Sun, 10 Mar 2024 13:07:11 +0900 Subject: [PATCH 2/2] =?UTF-8?q?refactor=20:=20currentGenerationState=20def?= =?UTF-8?q?ault=EA=B0=92=20utils=20=EA=B0=92=EC=9C=BC=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/recoil/atom.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/recoil/atom.ts b/src/recoil/atom.ts index f0ebcde2..6fec3815 100644 --- a/src/recoil/atom.ts +++ b/src/recoil/atom.ts @@ -1,6 +1,8 @@ import { atom } from 'recoil'; import { recoilPersist } from 'recoil-persist'; +import { ACTIVITY_GENERATION } from '@/utils/generation'; + const sessionStorage = typeof window !== 'undefined' ? window.sessionStorage : undefined; @@ -11,6 +13,6 @@ const { persistAtom } = recoilPersist({ export const currentGenerationState = atom({ key: 'currentGenerationState', - default: '34', + default: ACTIVITY_GENERATION, effects_UNSTABLE: [persistAtom], });