Skip to content

Commit

Permalink
Use BaseLayout
Browse files Browse the repository at this point in the history
  • Loading branch information
Anboias committed Dec 6, 2024
1 parent aae3035 commit 9f04505
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
7 changes: 1 addition & 6 deletions src/components/layout/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,9 @@ type Props = {
children: ReactNode;
title: string;
subtitle?: string;
hideHeader?: boolean;
};

const Layout = ({ children, title, subtitle, hideHeader = false }: Props) => {
if (hideHeader) {
return <BaseLayout title={title}>{children}</BaseLayout>;
}

const Layout = ({ children, title, subtitle }: Props) => {
return (
<BaseLayout title={title}>
<Header title={title} subtitle={subtitle} />
Expand Down
6 changes: 3 additions & 3 deletions src/pages/not-found/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Layout from '../../components/layout';
import { BaseLayout } from '../../components/layout';
import styles from './not-found.module.scss';
import { images } from '../../utils';
import Button from '../../components/button';

const NotFoundPage = () => {
return (
<Layout title="404 Not Found" hideHeader>
<BaseLayout title="404 Not Found">
<div className={styles.wrapper}>
<img src={images.notFound} alt="404" className={styles.image} />

Expand All @@ -20,7 +20,7 @@ const NotFoundPage = () => {
</Button>
</div>
</div>
</Layout>
</BaseLayout>
);
};

Expand Down

0 comments on commit 9f04505

Please sign in to comment.