Skip to content

Commit

Permalink
refactor: detach Home component from Aside component
Browse files Browse the repository at this point in the history
  • Loading branch information
lumirlumir committed Sep 16, 2024
1 parent 7def555 commit df85d36
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
11 changes: 11 additions & 0 deletions src/components/aside/Home/Home.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Link from 'next/link';

export default async function Home() {
return (
<ul>
<li>
<Link href="/">Home</Link>
</li>
</ul>
);
}
3 changes: 3 additions & 0 deletions src/components/aside/Home/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Home from './Home';

export default Home;
9 changes: 2 additions & 7 deletions src/layouts/Aside/Aside.jsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
import Link from 'next/link';

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}>
<ul>
<li>
<Link href="/">Home</Link>
</li>
</ul>
<Home />
<Categories />
</aside>
);
Expand Down

0 comments on commit df85d36

Please sign in to comment.