{
- trackUserEvent(MessageEnum.SECTION_INTERACT_MAIN);
- setOpen((prev) => !prev);
- }}
+ onClick={() => setOpen((prev) => !prev)}
>
요약 정보 {open ? '펼치기' : '접기'}
diff --git a/src/components/auth-required/main/index.ts b/src/app/(auth-required)/main/components/index.ts
similarity index 100%
rename from src/components/auth-required/main/index.ts
rename to src/app/(auth-required)/main/components/index.ts
diff --git a/src/app/(with-tracker)/(auth-required)/main/page.tsx b/src/app/(auth-required)/main/page.tsx
similarity index 100%
rename from src/app/(with-tracker)/(auth-required)/main/page.tsx
rename to src/app/(auth-required)/main/page.tsx
diff --git a/src/app/(with-tracker)/(login)/Content.tsx b/src/app/(login)/Content.tsx
similarity index 96%
rename from src/app/(with-tracker)/(login)/Content.tsx
rename to src/app/(login)/Content.tsx
index bad17fb..a4dba8b 100644
--- a/src/app/(with-tracker)/(login)/Content.tsx
+++ b/src/app/(login)/Content.tsx
@@ -1,13 +1,12 @@
'use client';
+import { useMutation } from '@tanstack/react-query';
import { useRouter } from 'next/navigation';
import { useForm } from 'react-hook-form';
import Image from 'next/image';
-import { useMutation } from '@tanstack/react-query';
import { Input, Button } from '@/components';
-import { LoginVo } from '@/types';
import { login, sampleLogin } from '@/apis';
-import { trackUserEvent, MessageEnum } from '@/utils/trackUtil';
+import { LoginVo } from '@/types';
const responsiveStyle =
"flex items-center gap-5 max-MBI:before:inline-block max-MBI:before:bg-[url('/favicon.png')] max-MBI:before:[background-size:_100%_100%] max-MBI:before:w-16 max-MBI:before:h-16";
@@ -22,7 +21,6 @@ export const Content = () => {
} = useForm({ mode: 'all' });
const onSuccess = () => {
- trackUserEvent(MessageEnum.LOGIN);
replace('/main?asc=false&sort=');
};
diff --git a/src/app/(with-tracker)/(login)/page.tsx b/src/app/(login)/page.tsx
similarity index 67%
rename from src/app/(with-tracker)/(login)/page.tsx
rename to src/app/(login)/page.tsx
index fc27d6a..0ffa5c5 100644
--- a/src/app/(with-tracker)/(login)/page.tsx
+++ b/src/app/(login)/page.tsx
@@ -1,10 +1,7 @@
import { Metadata } from 'next';
-
import { Content } from './Content';
-export const metadata: Metadata = {
- title: '로그인',
-};
+export const metadata: Metadata = { title: '로그인' };
export default function Page() {
return ;
diff --git a/src/app/(with-tracker)/layout.tsx b/src/app/(with-tracker)/layout.tsx
deleted file mode 100644
index dd524eb..0000000
--- a/src/app/(with-tracker)/layout.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-import { Suspense } from 'react';
-import { TrackVisitEvent } from '@/utils/trackUtil';
-
-export default function Layout({ children }: { children: React.ReactNode }) {
- return (
-
-
- {children}
-
- );
-}
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 7917b98..4c27c7d 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -1,13 +1,13 @@
+import { GoogleAnalytics } from '@next/third-parties/google';
import { Noto_Sans_KR } from 'next/font/google';
import { ToastContainer } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';
-import * as sentry from '@sentry/nextjs';
+import { ErrorBoundary } from '@sentry/nextjs';
+import { ReactNode, Suspense } from 'react';
import type { Metadata } from 'next';
-import { ReactNode } from 'react';
-import { GoogleAnalytics } from '@next/third-parties/google';
-import './globals.css';
import { ChannelTalkProvider, QueryProvider } from '@/components';
import { env } from '@/constants';
+import './globals.css';
export const BASE = 'https://velog-dashboard.kro.kr/';
@@ -16,9 +16,7 @@ export const metadata: Metadata = {
metadataBase: new URL(BASE),
description: '어디서든 편리하게 확인하는 Velog 통계 서비스, Velog Dashboard',
icons: { icon: '/favicon.png' },
- alternates: {
- canonical: BASE,
- },
+ alternates: { canonical: BASE },
openGraph: {
siteName: 'Velog Dashboard',
description:
@@ -37,14 +35,14 @@ export default function RootLayout({
return (
-
+
- {children}
+ {children}
-
+
diff --git a/src/components/common/ArriveSoon.tsx b/src/components/ArriveSoon.tsx
similarity index 100%
rename from src/components/common/ArriveSoon.tsx
rename to src/components/ArriveSoon.tsx
diff --git a/src/components/common/Button.tsx b/src/components/Button.tsx
similarity index 100%
rename from src/components/common/Button.tsx
rename to src/components/Button.tsx
diff --git a/src/components/common/Check.tsx b/src/components/Check.tsx
similarity index 100%
rename from src/components/common/Check.tsx
rename to src/components/Check.tsx
diff --git a/src/components/common/Dropdown.tsx b/src/components/Dropdown.tsx
similarity index 100%
rename from src/components/common/Dropdown.tsx
rename to src/components/Dropdown.tsx
diff --git a/src/components/common/Icon/SvgrMock.tsx b/src/components/Icon/SvgrMock.tsx
similarity index 100%
rename from src/components/common/Icon/SvgrMock.tsx
rename to src/components/Icon/SvgrMock.tsx
diff --git a/src/components/common/Icon/icons/Analytics.svg b/src/components/Icon/icons/Analytics.svg
similarity index 100%
rename from src/components/common/Icon/icons/Analytics.svg
rename to src/components/Icon/icons/Analytics.svg
diff --git a/src/components/common/Icon/icons/Arrow.svg b/src/components/Icon/icons/Arrow.svg
similarity index 100%
rename from src/components/common/Icon/icons/Arrow.svg
rename to src/components/Icon/icons/Arrow.svg
diff --git a/src/components/common/Icon/icons/Compare.svg b/src/components/Icon/icons/Compare.svg
similarity index 100%
rename from src/components/common/Icon/icons/Compare.svg
rename to src/components/Icon/icons/Compare.svg
diff --git a/src/components/common/Icon/icons/Leaderboards.svg b/src/components/Icon/icons/Leaderboards.svg
similarity index 100%
rename from src/components/common/Icon/icons/Leaderboards.svg
rename to src/components/Icon/icons/Leaderboards.svg
diff --git a/src/components/common/Icon/icons/Like.svg b/src/components/Icon/icons/Like.svg
similarity index 100%
rename from src/components/common/Icon/icons/Like.svg
rename to src/components/Icon/icons/Like.svg
diff --git a/src/components/common/Icon/icons/Shortcut.svg b/src/components/Icon/icons/Shortcut.svg
similarity index 100%
rename from src/components/common/Icon/icons/Shortcut.svg
rename to src/components/Icon/icons/Shortcut.svg
diff --git a/src/components/common/Icon/icons/index.ts b/src/components/Icon/icons/index.ts
similarity index 100%
rename from src/components/common/Icon/icons/index.ts
rename to src/components/Icon/icons/index.ts
diff --git a/src/components/common/Icon/index.tsx b/src/components/Icon/index.tsx
similarity index 100%
rename from src/components/common/Icon/index.tsx
rename to src/components/Icon/index.tsx
diff --git a/src/components/common/Input.tsx b/src/components/Input.tsx
similarity index 94%
rename from src/components/common/Input.tsx
rename to src/components/Input.tsx
index 378528c..ab9f648 100644
--- a/src/components/common/Input.tsx
+++ b/src/components/Input.tsx
@@ -15,7 +15,7 @@ const FORMS = {
export const Input = forwardRef(
(
{ form = 'LARGE', size, ...rest }: IProp,
- ref?: ForwardedRef | undefined,
+ ref?: ForwardedRef,
) => (
{
- const eventType = typeof event === 'number' ? event : MessageEnum[event];
-
- if (EVENT_LOG === 'true') {
- instance('/event', {
- body: { eventType },
- method: 'POST',
- keepalive: true,
- });
- }
-};
-
-export const TrackVisitEvent = () => {
- const data = useRef({
- loadDate: undefined,
- unloadDate: undefined,
- });
-
- const setUnloadData = () => {
- data.current = { ...data.current, unloadDate: new Date().toISOString() };
- instance('/stay', { body: data.current, method: 'POST', keepalive: true });
- };
-
- useEffect(() => {
- // 페이지 로드 시 시간 기록
- data.current.loadDate = new Date().toISOString();
- if (NODE_ENV === 'production' && EVENT_LOG === 'true') {
- window.addEventListener('unload', setUnloadData);
- }
-
- return () => {
- if (NODE_ENV === 'production' && EVENT_LOG === 'true') {
- window.removeEventListener('unload', setUnloadData);
- }
- };
- }, []);
-
- return eventTracker;
-};