Skip to content

Commit fcce2d7

Browse files
authored
[25.04.21 / TASK-171,TASK-172] Modify - UI Refactoring (#29)
1 parent 46d4b9d commit fcce2d7

File tree

10 files changed

+175
-74
lines changed

10 files changed

+175
-74
lines changed

next.config.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import { withSentryConfig } from '@sentry/nextjs';
2+
23
/** @type {import('next').NextConfig} */
34
const nextConfig = {
45
reactStrictMode: true,
56
experimental: { forceSwcTransforms: true },
67
output: 'standalone',
7-
8+
hideSourceMaps: true,
9+
productionBrowserSourceMaps: false,
810
webpack: (config, options) => {
911
config.module.rules.push({
1012
test: /\.svg$/i,
11-
use: [
12-
options.defaultLoaders.babel,
13-
{ loader: '@svgr/webpack', options: { babel: false } },
14-
],
13+
use: [options.defaultLoaders.babel, { loader: '@svgr/webpack', options: { babel: false } }],
1514
});
15+
1616
return config;
1717
},
1818

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"@next/third-parties": "^15.1.7",
2424
"@sentry/core": "^8.47.0",
2525
"@sentry/nextjs": "^8.47.0",
26+
"@sentry/webpack-plugin": "^3.3.1",
2627
"@tailwindcss/typography": "^0.5.16",
2728
"@tanstack/react-query": "^5.69.0",
2829
"@tanstack/react-query-devtools": "^5.69.0",

pnpm-lock.yaml

Lines changed: 129 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/(auth-required)/compare/page.tsx

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/app/(auth-required)/components/header/Section.tsx

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ import { COLORS } from '@/constants';
44
import { useCustomNavigation } from '@/hooks';
55

66
export const defaultStyle =
7-
'w-[180px] h-[65px] px-9 transition-all duration-300 shrink-0 max-MBI:w-[65px] max-MBI:px-0 ';
8-
export const navigateStyle =
9-
'gap-5 flex items-center justify-center cursor-pointer ';
10-
export const textStyle =
11-
'text-ST4 shrink-0 transition-all duration-300 max-MBI:hidden ';
7+
'w-[180px] h-[65px] px-9 transition-all duration-300 shrink-0 max-MBI:w-[65px] max-MBI:px-0';
8+
export const navigateStyle = 'gap-5 flex items-center justify-center cursor-pointer';
9+
export const textStyle = 'text-ST4 shrink-0 transition-all duration-300 max-MBI:hidden';
1210

1311
type clickType = 'link' | 'function' | 'none';
1412
type BaseType = { icon: NameType };
@@ -44,23 +42,16 @@ export const Section = <T extends clickType>({
4442

4543
if (clickType === 'link') {
4644
return (
47-
<div
48-
onClick={() => push(action)}
49-
className={defaultStyle + navigateStyle}
50-
>
45+
<div onClick={() => push(action)} className={`${defaultStyle} ${navigateStyle}`}>
5146
<Icon
5247
size={25}
5348
color={
54-
COLORS.TEXT[
55-
typeof action === 'string' && action.includes(currentPath)
56-
? 'MAIN'
57-
: 'ALT'
58-
]
49+
COLORS.TEXT[typeof action === 'string' && action.includes(currentPath) ? 'MAIN' : 'ALT']
5950
}
6051
name={icon}
6152
/>
6253
<span
63-
className={`${action.split('?')[0] === currentPath ? 'text-TEXT-MAIN' : 'text-TEXT-ALT'} ${textStyle}`}
54+
className={`${textStyle} ${action.split('?')[0] === currentPath ? 'text-TEXT-MAIN' : 'text-TEXT-ALT'}`}
6455
>
6556
{children}
6657
</span>
@@ -71,7 +62,7 @@ export const Section = <T extends clickType>({
7162
return (
7263
<div
7364
onClick={action}
74-
className={`${defaultStyle + navigateStyle} TBL:min-w-[180px] rounded-t-[4px] w-[fit-content_!important] max-MBI:w-[65px_!important]`}
65+
className={`${defaultStyle} ${navigateStyle} TBL:min-w-[180px] rounded-t-[4px] w-[fit-content_!important] max-MBI:w-[65px_!important]`}
7566
>
7667
{children}
7768
</div>

src/app/(auth-required)/components/header/index.tsx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { useEffect, useRef, useState } from 'react';
66
import Image from 'next/image';
77
import { revalidate } from '@/utils/revalidateUtil';
88
import { PATHS, SCREENS } from '@/constants';
9-
import { NameType } from '@/components';
9+
import { Icon, NameType } from '@/components';
1010
import { useCustomNavigation, useResponsive } from '@/hooks';
1111
import { logout, me } from '@/apis';
1212
import { useModal } from '@/hooks/useModal';
@@ -25,7 +25,6 @@ const layouts: Array<{ icon: NameType; title: string; path: string }> = [
2525
title: '리더보드',
2626
path: `/leaderboards${PARAMS.LEADERBOARDS}`,
2727
},
28-
{ icon: 'Compare', title: '통계 비교', path: '/compare' },
2928
];
3029

3130
export const Header = () => {
@@ -84,7 +83,10 @@ export const Header = () => {
8483
</Section>
8584
))}
8685
</div>
87-
86+
<Section clickType="function" action={() => ModalOpen(<Modal />)}>
87+
<Icon name="Loudspeaker" size={25} />
88+
<span className={`${textStyle} text-TEXT-ALT`}>공지사항</span>
89+
</Section>
8890
<div className="w-fit h-fit flex flex-col relative z-50" ref={menu}>
8991
<Section clickType="function" action={() => setOpen((prev) => !prev)}>
9092
<Image
@@ -94,7 +96,7 @@ export const Header = () => {
9496
src={profiles?.profile.thumbnail || '/profile.jpg'}
9597
alt=""
9698
/>
97-
<span className={textStyle + 'text-TEXT-ALT'} id="profile">
99+
<span className={`${textStyle} text-TEXT-ALT`} id="profile">
98100
{profiles?.username || 'NULL'}
99101
</span>
100102
</Section>
@@ -111,12 +113,6 @@ export const Header = () => {
111113
>
112114
로그아웃
113115
</button>
114-
<button
115-
className="text-TEXT-MAIN text-I3 p-5 max-MBI:p-4 flex whitespace-nowrap w-auto hover:bg-BG-ALT"
116-
onClick={() => ModalOpen(<Modal />)}
117-
>
118-
공지사항
119-
</button>
120116
</div>
121117
</div>
122118
)}

0 commit comments

Comments
 (0)