Skip to content

Commit

Permalink
refactor: make Aside component as a single wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
lumirlumir committed Sep 16, 2024
1 parent df85d36 commit 1abd394
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
17 changes: 15 additions & 2 deletions src/app/layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,25 @@ import Body from '@/layouts/Body';
import Header from '@/layouts/Header';
import Main from '@/layouts/Main';

export default function Layout({ children }) {
import Categories from '@/components/aside/Categories';
import Home from '@/components/aside/Home';

// TODO: import '@/styles/global.scss';

// TODO: export const metadata = {
// title: 'Next.js',
// description: 'Generated by Next.js',
// };

export default function RootLayout({ children }) {
return (
<html lang="ko">
<Body>
<Header />
<Aside />
<Aside>
<Home />
<Categories />
</Aside>
<Main>{children}</Main>
<SpeedInsights />
</Body>
Expand Down
12 changes: 2 additions & 10 deletions src/layouts/Aside/Aside.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
import Categories from '@/components/aside/Categories';
import Home from '@/components/aside/Home';

import styles from './Aside.module.scss';

export default async function Aside() {
return (
<aside className={styles.aside}>
<Home />
<Categories />
</aside>
);
export default function Aside({ children }) {
return <aside className={styles.aside}>{children}</aside>;
}

0 comments on commit 1abd394

Please sign in to comment.