Skip to content

Commit

Permalink
refactor(frontend): move pages to app dir
Browse files Browse the repository at this point in the history
  • Loading branch information
chao-mu committed Jul 24, 2024
1 parent 88636d4 commit 27bda41
Show file tree
Hide file tree
Showing 65 changed files with 9 additions and 21 deletions.
10 changes: 0 additions & 10 deletions frontend/src/app/(legacy)/[[...slug]]/page.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions frontend/src/app/(legacy)/layout.tsx

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 7 additions & 1 deletion frontend/src/app/(scoreboard)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { Layout } from '@/legacy/Layout';
import WebVitals from '@/legacy/WebVitals';

export default function RootLayout({ children }: { children: React.ReactNode }) {
return <Layout>{children}</Layout>;
return (
<>
<WebVitals />
<Layout>{children}</Layout>
</>
);
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
'use client';

import dynamic from 'next/dynamic';
import { useReportWebVitals } from 'next/web-vitals';
import ReactGA from 'react-ga4';

const App = dynamic(() => import('@/App'), { ssr: false });

ReactGA.initialize('G-9VPNTDELD2');

export function ClientOnly() {
export default function WebVitals() {
useReportWebVitals(({ id, name, value }) => {
ReactGA.event({
category: 'Web Vitals',
Expand All @@ -23,5 +20,5 @@ export function ClientOnly() {
});
});

return <App />;
return <></>;
}

0 comments on commit 27bda41

Please sign in to comment.