Skip to content

Commit

Permalink
chore: wip -- undo pages changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kasir-barati committed May 16, 2024
1 parent 5f0da7a commit 9566063
Show file tree
Hide file tree
Showing 8 changed files with 434 additions and 444 deletions.
46 changes: 22 additions & 24 deletions apps/frontend/src/app/error.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
'use client';

// import { useEffect } from 'react';
import { useEffect } from 'react';

export default function Error() {
// {
// error,
// reset,
// }: {
// error: Error & { digest?: string };
// reset: () => void;
// }
// useEffect(() => {
// console.error(error);
// }, [error]);
export default function Error({
error,
reset,
}: {
error: Error & { digest?: string };
reset: () => void;
}) {
useEffect(() => {
console.error(error);
}, [error]);

return (
<></>
// <div>
// <h2>Something went wrong!</h2>
// <button
// onClick={
// // Attempt to recover by trying to re-render the segment
// () => reset()
// }
// >
// Try again
// </button>
// </div>
<div>
<h2>Something went wrong!</h2>
<button
onClick={
// Attempt to recover by trying to re-render the segment
() => reset()
}
>
Try again
</button>
</div>
);
}
33 changes: 16 additions & 17 deletions apps/frontend/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
// import '@mdxeditor/editor/style.css';
// import { Viewport } from 'next';
// import { Roboto } from 'next/font/google';
// import { Application } from '../shared/components/application/application.component';
import '@mdxeditor/editor/style.css';
import { Viewport } from 'next';
import { Roboto } from 'next/font/google';
import { Application } from '../shared/components/application/application.component';
import './global.css';

// const roboto = Roboto({
// weight: ['300', '400', '500', '700'],
// subsets: ['latin'],
// });
const roboto = Roboto({
weight: ['300', '400', '500', '700'],
subsets: ['latin'],
});

// export const viewport: Viewport = {
// initialScale: 1,
// width: 'device-width',
// };
export const viewport: Viewport = {
initialScale: 1,
width: 'device-width',
};

export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html
lang="en"
// className={roboto.className}
>
<body>{/* <Application>{children}</Application> */}</body>
<html lang="en" className={roboto.className}>
<body>
<Application>{children}</Application>
</body>
</html>
);
}
75 changes: 37 additions & 38 deletions apps/frontend/src/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,45 +1,44 @@
'use client';

// import MuiLink from '@mui/material/Link';
// import Typography from '@mui/material/Typography';
// import Grid2 from '@mui/material/Unstable_Grid2';
// import Link from 'next/link';
import MuiLink from '@mui/material/Link';
import Typography from '@mui/material/Typography';
import Grid2 from '@mui/material/Unstable_Grid2';
import Link from 'next/link';

export default function NotFound() {
return (
<></>
// <Grid2
// container
// textAlign="center"
// direction="column"
// padding={13}
// >
// <Grid2>
// <Typography variant="h1" aria-label="404" color="slategray">
// 404
// </Typography>
// </Grid2>
// <Grid2>
// <Typography
// aria-label="Page not found"
// variant="body1"
// letterSpacing={1.2}
// color="slategray"
// >
// Page not found
// </Typography>
// </Grid2>
// <Grid2>
// <MuiLink
// href="/"
// variant="body2"
// underline="none"
// component={Link}
// aria-label="Go to the front page"
// >
// Go to the front page &rarr;
// </MuiLink>
// </Grid2>
// </Grid2>
<Grid2
container
textAlign="center"
direction="column"
padding={13}
>
<Grid2>
<Typography variant="h1" aria-label="404" color="slategray">
404
</Typography>
</Grid2>
<Grid2>
<Typography
aria-label="Page not found"
variant="body1"
letterSpacing={1.2}
color="slategray"
>
Page not found
</Typography>
</Grid2>
<Grid2>
<MuiLink
href="/"
variant="body2"
underline="none"
component={Link}
aria-label="Go to the front page"
>
Go to the front page &rarr;
</MuiLink>
</Grid2>
</Grid2>
);
}
8 changes: 4 additions & 4 deletions apps/frontend/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Metadata, Viewport } from 'next';
// import { Latest } from '../shared/components/latest/latest.component';
// import { SubHeader } from '../shared/components/sub-header/sub-header.component';
import { Latest } from '../shared/components/latest/latest.component';
import { SubHeader } from '../shared/components/sub-header/sub-header.component';

export const metadata: Metadata = {
title: 'you-say',
Expand All @@ -15,8 +15,8 @@ export const viewport: Viewport = {
export default function Index() {
return (
<div>
{/* <SubHeader />
<Latest /> */}
<SubHeader />
<Latest />
</div>
);
}
Loading

0 comments on commit 9566063

Please sign in to comment.