From 847f5962a7d8fa766eae4a9754de14e250ca203c Mon Sep 17 00:00:00 2001 From: six-standard Date: Thu, 10 Apr 2025 19:56:13 +0900 Subject: [PATCH 1/6] modify: branch init --- next.config.mjs | 10 ++-- package.json | 1 + pnpm-lock.yaml | 129 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 135 insertions(+), 5 deletions(-) diff --git a/next.config.mjs b/next.config.mjs index b5ba0b5..9b7a842 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,18 +1,18 @@ import { withSentryConfig } from '@sentry/nextjs'; + /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, experimental: { forceSwcTransforms: true }, output: 'standalone', - + hideSourceMaps: true, + productionBrowserSourceMaps: false, webpack: (config, options) => { config.module.rules.push({ test: /\.svg$/i, - use: [ - options.defaultLoaders.babel, - { loader: '@svgr/webpack', options: { babel: false } }, - ], + use: [options.defaultLoaders.babel, { loader: '@svgr/webpack', options: { babel: false } }], }); + return config; }, diff --git a/package.json b/package.json index f6a4e77..1eea6cf 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "@next/third-parties": "^15.1.7", "@sentry/core": "^8.47.0", "@sentry/nextjs": "^8.47.0", + "@sentry/webpack-plugin": "^3.3.1", "@tailwindcss/typography": "^0.5.16", "@tanstack/react-query": "^5.69.0", "@tanstack/react-query-devtools": "^5.69.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 96f0cc5..8e652a7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,6 +20,9 @@ importers: '@sentry/nextjs': specifier: ^8.47.0 version: 8.47.0(@opentelemetry/core@1.30.0(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.56.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.0(@opentelemetry/api@1.9.0))(next@14.2.18(@babel/core@7.26.0)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(webpack@5.97.1) + '@sentry/webpack-plugin': + specifier: ^3.3.1 + version: 3.3.1(webpack@5.97.1) '@tailwindcss/typography': specifier: ^0.5.16 version: 0.5.16(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@20.17.10)(typescript@5.7.2))) @@ -1470,6 +1473,10 @@ packages: resolution: {integrity: sha512-aa7XKgZMVl6l04NY+3X7BP7yvQ/s8scn8KzQfTLrGRarziTlMGrsCOBQtCNWXOPEbtxAIHpZ9dsrAn5EJSivOQ==} engines: {node: '>= 14'} + '@sentry/babel-plugin-component-annotate@3.3.1': + resolution: {integrity: sha512-5GOxGT7lZN+I8A7Vp0rWY+726FDKEw8HnFiebe51rQrMbfGfCu2Aw9uSM0nT9OG6xhV6WvGccIcCszTPs4fUZQ==} + engines: {node: '>= 14'} + '@sentry/browser@8.47.0': resolution: {integrity: sha512-K6BzHisykmbFy/wORtGyfsAlw7ShevLALzu3ReZZZ18dVubO1bjSNjkZQU9MJD5Jcb9oLwkq89n3N9XIBfvdRA==} engines: {node: '>=14.18'} @@ -1478,52 +1485,102 @@ packages: resolution: {integrity: sha512-ouQh5sqcB8vsJ8yTTe0rf+iaUkwmeUlGNFi35IkCFUQlWJ22qS6OfvNjOqFI19e6eGUXks0c/2ieFC4+9wJ+1g==} engines: {node: '>= 14'} + '@sentry/bundler-plugin-core@3.3.1': + resolution: {integrity: sha512-Dd6xaWb293j9otEJ1yJqG2Ra6zB49OPzMNdIkdP8wdY+S9UFQE5PyKTyredmPY7hqCc005OrUQZolIIo9Zl13A==} + engines: {node: '>= 14'} + '@sentry/cli-darwin@2.39.1': resolution: {integrity: sha512-kiNGNSAkg46LNGatfNH5tfsmI/kCAaPA62KQuFZloZiemTNzhy9/6NJP8HZ/GxGs8GDMxic6wNrV9CkVEgFLJQ==} engines: {node: '>=10'} os: [darwin] + '@sentry/cli-darwin@2.42.2': + resolution: {integrity: sha512-GtJSuxER7Vrp1IpxdUyRZzcckzMnb4N5KTW7sbTwUiwqARRo+wxS+gczYrS8tdgtmXs5XYhzhs+t4d52ITHMIg==} + engines: {node: '>=10'} + os: [darwin] + '@sentry/cli-linux-arm64@2.39.1': resolution: {integrity: sha512-5VbVJDatolDrWOgaffsEM7znjs0cR8bHt9Bq0mStM3tBolgAeSDHE89NgHggfZR+DJ2VWOy4vgCwkObrUD6NQw==} engines: {node: '>=10'} cpu: [arm64] os: [linux, freebsd] + '@sentry/cli-linux-arm64@2.42.2': + resolution: {integrity: sha512-BOxzI7sgEU5Dhq3o4SblFXdE9zScpz6EXc5Zwr1UDZvzgXZGosUtKVc7d1LmkrHP8Q2o18HcDWtF3WvJRb5Zpw==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux, freebsd] + '@sentry/cli-linux-arm@2.39.1': resolution: {integrity: sha512-DkENbxyRxUrfLnJLXTA4s5UL/GoctU5Cm4ER1eB7XN7p9WsamFJd/yf2KpltkjEyiTuplv0yAbdjl1KX3vKmEQ==} engines: {node: '>=10'} cpu: [arm] os: [linux, freebsd] + '@sentry/cli-linux-arm@2.42.2': + resolution: {integrity: sha512-7udCw+YL9lwq+9eL3WLspvnuG+k5Icg92YE7zsteTzWLwgPVzaxeZD2f8hwhsu+wmL+jNqbpCRmktPteh3i2mg==} + engines: {node: '>=10'} + cpu: [arm] + os: [linux, freebsd] + '@sentry/cli-linux-i686@2.39.1': resolution: {integrity: sha512-pXWVoKXCRrY7N8vc9H7mETiV9ZCz+zSnX65JQCzZxgYrayQPJTc+NPRnZTdYdk5RlAupXaFicBI2GwOCRqVRkg==} engines: {node: '>=10'} cpu: [x86, ia32] os: [linux, freebsd] + '@sentry/cli-linux-i686@2.42.2': + resolution: {integrity: sha512-Sw/dQp5ZPvKnq3/y7wIJyxTUJYPGoTX/YeMbDs8BzDlu9to2LWV3K3r7hE7W1Lpbaw4tSquUHiQjP5QHCOS7aQ==} + engines: {node: '>=10'} + cpu: [x86, ia32] + os: [linux, freebsd] + '@sentry/cli-linux-x64@2.39.1': resolution: {integrity: sha512-IwayNZy+it7FWG4M9LayyUmG1a/8kT9+/IEm67sT5+7dkMIMcpmHDqL8rWcPojOXuTKaOBBjkVdNMBTXy0mXlA==} engines: {node: '>=10'} cpu: [x64] os: [linux, freebsd] + '@sentry/cli-linux-x64@2.42.2': + resolution: {integrity: sha512-mU4zUspAal6TIwlNLBV5oq6yYqiENnCWSxtSQVzWs0Jyq97wtqGNG9U+QrnwjJZ+ta/hvye9fvL2X25D/RxHQw==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux, freebsd] + '@sentry/cli-win32-i686@2.39.1': resolution: {integrity: sha512-NglnNoqHSmE+Dz/wHeIVRnV2bLMx7tIn3IQ8vXGO5HWA2f8zYJGktbkLq1Lg23PaQmeZLPGlja3gBQfZYSG10Q==} engines: {node: '>=10'} cpu: [x86, ia32] os: [win32] + '@sentry/cli-win32-i686@2.42.2': + resolution: {integrity: sha512-iHvFHPGqgJMNqXJoQpqttfsv2GI3cGodeTq4aoVLU/BT3+hXzbV0x1VpvvEhncJkDgDicJpFLM8sEPHb3b8abw==} + engines: {node: '>=10'} + cpu: [x86, ia32] + os: [win32] + '@sentry/cli-win32-x64@2.39.1': resolution: {integrity: sha512-xv0R2CMf/X1Fte3cMWie1NXuHmUyQPDBfCyIt6k6RPFPxAYUgcqgMPznYwVMwWEA1W43PaOkSn3d8ZylsDaETw==} engines: {node: '>=10'} cpu: [x64] os: [win32] + '@sentry/cli-win32-x64@2.42.2': + resolution: {integrity: sha512-vPPGHjYoaGmfrU7xhfFxG7qlTBacroz5NdT+0FmDn6692D8IvpNXl1K+eV3Kag44ipJBBeR8g1HRJyx/F/9ACw==} + engines: {node: '>=10'} + cpu: [x64] + os: [win32] + '@sentry/cli@2.39.1': resolution: {integrity: sha512-JIb3e9vh0+OmQ0KxmexMXg9oZsR/G7HMwxt5BUIKAXZ9m17Xll4ETXTRnRUBT3sf7EpNGAmlQk1xEmVN9pYZYQ==} engines: {node: '>= 10'} hasBin: true + '@sentry/cli@2.42.2': + resolution: {integrity: sha512-spb7S/RUumCGyiSTg8DlrCX4bivCNmU/A1hcfkwuciTFGu8l5CDc2I6jJWWZw8/0enDGxuj5XujgXvU5tr4bxg==} + engines: {node: '>= 10'} + hasBin: true + '@sentry/core@8.47.0': resolution: {integrity: sha512-iSEJZMe3DOcqBFZQAqgA3NB2lCWBc4Gv5x/SCri/TVg96wAlss4VrUunSI2Mp0J4jJ5nJcJ2ChqHSBAU48k3FA==} engines: {node: '>=14.18'} @@ -1564,6 +1621,12 @@ packages: peerDependencies: webpack: '>=4.40.0' + '@sentry/webpack-plugin@3.3.1': + resolution: {integrity: sha512-AFRnGNUnlIvq3M+ADdfWb+DIXWKK6yYEkVPAyOppkjO+cL/19gjXMdvAwv+CMFts28YCFKF8Kr3pamUiCmwodA==} + engines: {node: '>= 14'} + peerDependencies: + webpack: '>=4.40.0' + '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} @@ -6515,6 +6578,8 @@ snapshots: '@sentry/babel-plugin-component-annotate@2.22.7': {} + '@sentry/babel-plugin-component-annotate@3.3.1': {} + '@sentry/browser@8.47.0': dependencies: '@sentry-internal/browser-utils': 8.47.0 @@ -6537,27 +6602,62 @@ snapshots: - encoding - supports-color + '@sentry/bundler-plugin-core@3.3.1': + dependencies: + '@babel/core': 7.26.0 + '@sentry/babel-plugin-component-annotate': 3.3.1 + '@sentry/cli': 2.42.2 + dotenv: 16.4.7 + find-up: 5.0.0 + glob: 9.3.5 + magic-string: 0.30.8 + unplugin: 1.0.1 + transitivePeerDependencies: + - encoding + - supports-color + '@sentry/cli-darwin@2.39.1': optional: true + '@sentry/cli-darwin@2.42.2': + optional: true + '@sentry/cli-linux-arm64@2.39.1': optional: true + '@sentry/cli-linux-arm64@2.42.2': + optional: true + '@sentry/cli-linux-arm@2.39.1': optional: true + '@sentry/cli-linux-arm@2.42.2': + optional: true + '@sentry/cli-linux-i686@2.39.1': optional: true + '@sentry/cli-linux-i686@2.42.2': + optional: true + '@sentry/cli-linux-x64@2.39.1': optional: true + '@sentry/cli-linux-x64@2.42.2': + optional: true + '@sentry/cli-win32-i686@2.39.1': optional: true + '@sentry/cli-win32-i686@2.42.2': + optional: true + '@sentry/cli-win32-x64@2.39.1': optional: true + '@sentry/cli-win32-x64@2.42.2': + optional: true + '@sentry/cli@2.39.1': dependencies: https-proxy-agent: 5.0.1 @@ -6577,6 +6677,25 @@ snapshots: - encoding - supports-color + '@sentry/cli@2.42.2': + dependencies: + https-proxy-agent: 5.0.1 + node-fetch: 2.7.0 + progress: 2.0.3 + proxy-from-env: 1.1.0 + which: 2.0.2 + optionalDependencies: + '@sentry/cli-darwin': 2.42.2 + '@sentry/cli-linux-arm': 2.42.2 + '@sentry/cli-linux-arm64': 2.42.2 + '@sentry/cli-linux-i686': 2.42.2 + '@sentry/cli-linux-x64': 2.42.2 + '@sentry/cli-win32-i686': 2.42.2 + '@sentry/cli-win32-x64': 2.42.2 + transitivePeerDependencies: + - encoding + - supports-color + '@sentry/core@8.47.0': {} '@sentry/nextjs@8.47.0(@opentelemetry/core@1.30.0(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.56.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.0(@opentelemetry/api@1.9.0))(next@14.2.18(@babel/core@7.26.0)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(webpack@5.97.1)': @@ -6676,6 +6795,16 @@ snapshots: - encoding - supports-color + '@sentry/webpack-plugin@3.3.1(webpack@5.97.1)': + dependencies: + '@sentry/bundler-plugin-core': 3.3.1 + unplugin: 1.0.1 + uuid: 9.0.1 + webpack: 5.97.1 + transitivePeerDependencies: + - encoding + - supports-color + '@sinclair/typebox@0.27.8': {} '@sinonjs/commons@3.0.1': From 4b9175aadd393cbf45ba395d73d8849b3e70fe37 Mon Sep 17 00:00:00 2001 From: six-standard Date: Mon, 21 Apr 2025 19:10:13 +0900 Subject: [PATCH 2/6] =?UTF-8?q?modify:=20=ED=97=A4=EB=8D=94=20=EB=82=B4?= =?UTF-8?q?=EC=9A=A9=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(auth-required)/components/header/index.tsx | 14 +++++--------- src/components/Icon/icons/Compare.svg | 3 --- src/components/Icon/icons/Loudspeaker.svg | 12 ++++++++++++ src/components/Icon/icons/index.ts | 2 +- 4 files changed, 18 insertions(+), 13 deletions(-) delete mode 100644 src/components/Icon/icons/Compare.svg create mode 100644 src/components/Icon/icons/Loudspeaker.svg diff --git a/src/app/(auth-required)/components/header/index.tsx b/src/app/(auth-required)/components/header/index.tsx index 505255e..22ab658 100644 --- a/src/app/(auth-required)/components/header/index.tsx +++ b/src/app/(auth-required)/components/header/index.tsx @@ -6,7 +6,7 @@ import { useEffect, useRef, useState } from 'react'; import Image from 'next/image'; import { revalidate } from '@/utils/revalidateUtil'; import { PATHS, SCREENS } from '@/constants'; -import { NameType } from '@/components'; +import { Icon, NameType } from '@/components'; import { useCustomNavigation, useResponsive } from '@/hooks'; import { logout, me } from '@/apis'; import { useModal } from '@/hooks/useModal'; @@ -25,7 +25,6 @@ const layouts: Array<{ icon: NameType; title: string; path: string }> = [ title: '리더보드', path: `/leaderboards${PARAMS.LEADERBOARDS}`, }, - { icon: 'Compare', title: '통계 비교', path: '/compare' }, ]; export const Header = () => { @@ -84,7 +83,10 @@ export const Header = () => { ))} - +
ModalOpen()}> + + 공지사항 +
setOpen((prev) => !prev)}> { > 로그아웃 -
)} diff --git a/src/components/Icon/icons/Compare.svg b/src/components/Icon/icons/Compare.svg deleted file mode 100644 index 53debce..0000000 --- a/src/components/Icon/icons/Compare.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/components/Icon/icons/Loudspeaker.svg b/src/components/Icon/icons/Loudspeaker.svg new file mode 100644 index 0000000..492f810 --- /dev/null +++ b/src/components/Icon/icons/Loudspeaker.svg @@ -0,0 +1,12 @@ + + + diff --git a/src/components/Icon/icons/index.ts b/src/components/Icon/icons/index.ts index 89e04a9..9782399 100644 --- a/src/components/Icon/icons/index.ts +++ b/src/components/Icon/icons/index.ts @@ -1,7 +1,7 @@ export { default as Analytics } from './Analytics.svg'; export { default as Arrow } from './Arrow.svg'; -export { default as Compare } from './Compare.svg'; export { default as LeaderBoards } from './Leaderboards.svg'; export { default as Like } from './Like.svg'; export { default as Shortcut } from './Shortcut.svg'; export { default as Close } from './Close.svg'; +export { default as Loudspeaker } from './Loudspeaker.svg'; From afdf54cffec37e1882ba49a82acd87f4690396d3 Mon Sep 17 00:00:00 2001 From: six-standard Date: Mon, 21 Apr 2025 19:11:22 +0900 Subject: [PATCH 3/6] =?UTF-8?q?modify:=20=ED=95=84=EC=9A=94=EC=97=86?= =?UTF-8?q?=EB=8A=94=20=ED=8C=8C=EC=9D=BC=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(auth-required)/compare/page.tsx | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 src/app/(auth-required)/compare/page.tsx diff --git a/src/app/(auth-required)/compare/page.tsx b/src/app/(auth-required)/compare/page.tsx deleted file mode 100644 index b058aa6..0000000 --- a/src/app/(auth-required)/compare/page.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import { Metadata } from 'next'; -import { ArriveSoon } from '@/components'; - -export const metadata: Metadata = { title: '통계 비교' }; - -export default function Page() { - return ; -} From 350914e6f66fbe0c3be63a6b2e8afd0c5a32d2e2 Mon Sep 17 00:00:00 2001 From: six-standard Date: Mon, 21 Apr 2025 19:15:14 +0900 Subject: [PATCH 4/6] =?UTF-8?q?fix:=20=EA=B7=B8=EB=9E=98=ED=94=84=200.5?= =?UTF-8?q?=EB=8B=A8=EC=9C=84=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/instance.request.ts | 2 +- .../main/components/Section/Graph.tsx | 26 +++++-------------- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/src/apis/instance.request.ts b/src/apis/instance.request.ts index 122817e..744bb7c 100644 --- a/src/apis/instance.request.ts +++ b/src/apis/instance.request.ts @@ -68,7 +68,7 @@ export const instance = async ( signal: AbortSignal.timeout ? AbortSignal.timeout(Number(env.ABORT_MS)) : abortPolyfill(Number(env.ABORT_MS)), - credentials: input !== '/login' ? 'include' : 'omit', + credentials: 'include', cache: 'no-store', }); diff --git a/src/app/(auth-required)/main/components/Section/Graph.tsx b/src/app/(auth-required)/main/components/Section/Graph.tsx index fc925ba..67388fc 100644 --- a/src/app/(auth-required)/main/components/Section/Graph.tsx +++ b/src/app/(auth-required)/main/components/Section/Graph.tsx @@ -19,15 +19,7 @@ import { PostDetailValue } from '@/types'; import { useResponsive } from '@/hooks'; import { postDetail } from '@/apis'; -ChartJS.register( - CategoryScale, - LinearScale, - PointElement, - LineElement, - Title, - Tooltip, - Legend, -); +ChartJS.register(CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip, Legend); const datasets = { backgroundColor: COLORS.TEXT.MAIN, @@ -58,17 +50,13 @@ export const Graph = ({ id, releasedAt }: IProp) => { queryKey: [PATHS.DETAIL, type, id], queryFn: async () => await postDetail(id, type.start, type.end), select: ({ post }) => { - post = post.sort( - (a, b) => new Date(a.date).getTime() - new Date(b.date).getTime(), - ); + post = post.sort((a, b) => new Date(a.date).getTime() - new Date(b.date).getTime()); return { labels: post.map((i) => i.date.split('T')[0]), datasets: [ { label: type.type, - data: post.map( - (i) => i[`daily${type.type}Count` as keyof PostDetailValue], - ), + data: post.map((i) => i[`daily${type.type}Count` as keyof PostDetailValue]), ...datasets, }, ], @@ -141,9 +129,7 @@ export const Graph = ({ id, releasedAt }: IProp) => {
{!datas && (
- - 날짜를 선택해서 데이터를 확인하세요! - + 날짜를 선택해서 데이터를 확인하세요!
)} { interaction: { mode: 'nearest', intersect: false }, plugins: { legend: { display: false } }, scales: { - x: { axis: 'x', grid: { color: COLORS.BORDER.SUB } }, - y: { axis: 'y', grid: { color: COLORS.BORDER.SUB } }, + x: { axis: 'x', grid: { color: COLORS.BORDER.SUB }, ticks: { precision: 0 } }, + y: { axis: 'y', grid: { color: COLORS.BORDER.SUB }, ticks: { precision: 0 } }, }, }} className="w-[100%_!important] h-[auto_!important] max-h-[300px]" From 15f428741cabe871351f742901235bec40ad5e24 Mon Sep 17 00:00:00 2001 From: six-standard Date: Tue, 22 Apr 2025 09:04:29 +0900 Subject: [PATCH 5/6] =?UTF-8?q?refactor:=20=ED=95=84=EC=9A=94=20=EC=97=86?= =?UTF-8?q?=EB=8A=94=20=EC=A0=95=EB=A0=AC=20=EC=BD=94=EB=93=9C=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/components/Section/Graph.tsx | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/app/(auth-required)/main/components/Section/Graph.tsx b/src/app/(auth-required)/main/components/Section/Graph.tsx index 67388fc..23fdd04 100644 --- a/src/app/(auth-required)/main/components/Section/Graph.tsx +++ b/src/app/(auth-required)/main/components/Section/Graph.tsx @@ -49,19 +49,16 @@ export const Graph = ({ id, releasedAt }: IProp) => { const { data: datas } = useQuery({ queryKey: [PATHS.DETAIL, type, id], queryFn: async () => await postDetail(id, type.start, type.end), - select: ({ post }) => { - post = post.sort((a, b) => new Date(a.date).getTime() - new Date(b.date).getTime()); - return { - labels: post.map((i) => i.date.split('T')[0]), - datasets: [ - { - label: type.type, - data: post.map((i) => i[`daily${type.type}Count` as keyof PostDetailValue]), - ...datasets, - }, - ], - }; - }, + select: ({ post }) => ({ + labels: post.map((i) => i.date.split('T')[0]), + datasets: [ + { + label: type.type, + data: post.map((i) => i[`daily${type.type}Count` as keyof PostDetailValue]), + ...datasets, + }, + ], + }), enabled: !!type.start && !!type.end, }); From a57196d9109023faad43364b4e34fcc42dbcd5f1 Mon Sep 17 00:00:00 2001 From: six-standard Date: Fri, 25 Apr 2025 08:43:19 +0900 Subject: [PATCH 6/6] =?UTF-8?q?refactor:=20=ED=85=9C=ED=94=8C=EB=A6=BF=20?= =?UTF-8?q?=EB=A6=AC=ED=84=B0=EB=9F=B4=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/header/Section.tsx | 23 ++++++------------- .../components/header/index.tsx | 4 ++-- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/src/app/(auth-required)/components/header/Section.tsx b/src/app/(auth-required)/components/header/Section.tsx index 3371174..d0efba1 100644 --- a/src/app/(auth-required)/components/header/Section.tsx +++ b/src/app/(auth-required)/components/header/Section.tsx @@ -4,11 +4,9 @@ import { COLORS } from '@/constants'; import { useCustomNavigation } from '@/hooks'; export const defaultStyle = - 'w-[180px] h-[65px] px-9 transition-all duration-300 shrink-0 max-MBI:w-[65px] max-MBI:px-0 '; -export const navigateStyle = - 'gap-5 flex items-center justify-center cursor-pointer '; -export const textStyle = - 'text-ST4 shrink-0 transition-all duration-300 max-MBI:hidden '; + 'w-[180px] h-[65px] px-9 transition-all duration-300 shrink-0 max-MBI:w-[65px] max-MBI:px-0'; +export const navigateStyle = 'gap-5 flex items-center justify-center cursor-pointer'; +export const textStyle = 'text-ST4 shrink-0 transition-all duration-300 max-MBI:hidden'; type clickType = 'link' | 'function' | 'none'; type BaseType = { icon: NameType }; @@ -44,23 +42,16 @@ export const Section = ({ if (clickType === 'link') { return ( -
push(action)} - className={defaultStyle + navigateStyle} - > +
push(action)} className={`${defaultStyle} ${navigateStyle}`}> {children} @@ -71,7 +62,7 @@ export const Section = ({ return (
{children}
diff --git a/src/app/(auth-required)/components/header/index.tsx b/src/app/(auth-required)/components/header/index.tsx index 22ab658..eb86d66 100644 --- a/src/app/(auth-required)/components/header/index.tsx +++ b/src/app/(auth-required)/components/header/index.tsx @@ -85,7 +85,7 @@ export const Header = () => {
ModalOpen()}> - 공지사항 + 공지사항
setOpen((prev) => !prev)}> @@ -96,7 +96,7 @@ export const Header = () => { src={profiles?.profile.thumbnail || '/profile.jpg'} alt="" /> - + {profiles?.username || 'NULL'}