Skip to content

Commit

Permalink
Merge pull request #106 from sopt-makers/dev
Browse files Browse the repository at this point in the history
SOPT Web Admin 2.0.2
  • Loading branch information
Brokyeom authored Mar 21, 2024
2 parents 45bd231 + 283afd9 commit 212c9fd
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 9 deletions.
10 changes: 10 additions & 0 deletions src/assets/icons/SoptLogos/NowSoptLogo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/icons/SoptLogos/index.ts
Original file line number Diff line number Diff line change
@@ -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';
6 changes: 3 additions & 3 deletions src/components/common/Nav/GenerationDropDown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -21,8 +21,8 @@ function GenerationDropDown() {
const [isDropdownOn, setIsDropdownOn] = useState<boolean>(false);

const [selectedGenerationInfo, setSelectedGenerationInfo] = useState({
logo: <DoSoptLogo />,
slogan: 'DO',
logo: <NowSoptLogo />,
slogan: GENERATION_INFO[0].slogan,
});

const handleSelectedGeneration = (
Expand Down
4 changes: 4 additions & 0 deletions src/components/common/Nav/GenerationDropDown/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)`
Expand Down
4 changes: 2 additions & 2 deletions src/pages/attendanceAdmin/session/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -246,7 +246,7 @@ function SessionDetailPage() {
return () => closeAttendance();
default:
// eslint-disable-next-line prettier/prettier
return () => { };
return () => {};
}
};

Expand Down
4 changes: 3 additions & 1 deletion src/recoil/atom.ts
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -11,6 +13,6 @@ const { persistAtom } = recoilPersist({

export const currentGenerationState = atom<string>({
key: 'currentGenerationState',
default: '33',
default: ACTIVITY_GENERATION,
effects_UNSTABLE: [persistAtom],
});
4 changes: 2 additions & 2 deletions src/utils/generation.ts
Original file line number Diff line number Diff line change
@@ -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'];
7 changes: 6 additions & 1 deletion src/utils/nav.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down

0 comments on commit 212c9fd

Please sign in to comment.