Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .eslintrc.ci.json
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ด๋ ‡๊ฒŒ ํŒŒ์ผ์„ ์ƒˆ๋กœ ์ƒ์„ฑํ•˜๊ธฐ ๋ณด๋‹ค๋Š”

"@typescript-eslint/no-unused-vars": "warn"

์—๋Ÿฌ๋ฅผ ๊ฒฝ๊ณ ์ˆ˜์ค€์œผ๋กœ ๋‚ฎ์ถ”๊ธฐ๋งŒ ํ•˜๋ฉด ๋‹ค ํ•ด๊ฒฐ๋ ๊ฒƒ ๊ฐ™์€๋ฐ ์–ด๋–ป๊ฒŒ ์ƒ๊ฐํ•˜์„ธ์š”?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@najitwo ์š”๊ฑฐ๋Š” ๋กœ์ปฌ์—์„œํ• ๋•Œ๋Š” ๋นจ๊ฐ›๊ฒŒ ๋œจ๊ฒŒ ํ•˜๊ณ ์‹ถ์–ด์„œ warn์œผ๋กœ ์•ˆํ•˜๊ธดํ–ˆ๊ฑฐ๋“ ์š”
warn์œผ๋กœ ํ• ๊นŒ์š”..?ใ…‹ใ…‹ใ…‹

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋…ธ๋ž—๊ฒŒ ๋œจ๋‹ˆ๊นŒ... warn์œผ๋กœ ํ•˜์‹œ์ฃ !

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": [
"next/core-web-vitals",
"next/typescript",
"plugin:prettier/recommended"
],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": ["error"],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "off"
}
}
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
run: npm install

- name: Run Next.js Lint
run: npm run lint
run: npm run lint:ci
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"lint:ci": "next lint --config .eslintrc.ci.json"
},
"dependencies": {
"axios": "^1.7.7",
Expand Down
3 changes: 3 additions & 0 deletions src/app/(with-header-sidebar)/layout.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.header {
color: yellowgreen;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variables.css ์— ์ •์˜๋˜์ง€ ์•Š์€ ์ƒ‰์ƒ์„ ์‚ฌ์šฉํ•˜์…จ๋Š”๋ฐ
์ž„์‹œ๋กœ ์„ค์ •ํ•˜์‹ ๊ฑด๊ฐ€์š”?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋„ต..! ์ ์šฉ ์ž˜๋˜๋Š”์ง€ ํ™•์ธ์šฉ ์ž„์‹œ์ž…๋‹ˆ๋‹ค!

}
16 changes: 16 additions & 0 deletions src/app/(with-header-sidebar)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { ReactNode } from 'react';
import SideBar from '@/components/SideBar';
import styles from './layout.module.css';
import Header from '@/components/Header';

export default function Layout({ children }: { children: ReactNode }) {
return (
<>
<Header />
<nav>
<SideBar />
</nav>
<main>{children}</main>
</>
);
}
3 changes: 3 additions & 0 deletions src/app/(with-header-sidebar)/mydashboard/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function Page() {
return <div>my page</div>;
}
3 changes: 3 additions & 0 deletions src/components/Header.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.header {
color: skyblue;
}
9 changes: 9 additions & 0 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use client';
import { usePathname } from 'next/navigation';
import styles from './Header.module.css';

export default function Header() {
const pathname = usePathname();

return <header className={styles.header}>ํ—ค๋” {pathname}</header>;
}
3 changes: 3 additions & 0 deletions src/components/SideBar.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.active {
color: salmon;
}
26 changes: 26 additions & 0 deletions src/components/SideBar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
'use client';

import Link from 'next/link';
import { usePathname } from 'next/navigation';
import styles from './SideBar.module.css';

export default function SideBar() {
const pathname = usePathname();

return (
<div>
<Link
href={'/dashboard/1'}
className={`link ${pathname === '/dashboard/1' ? styles.active : ''}`}
>
๋Œ€์‹œ๋ณด๋“œ1
</Link>
<Link
href={'/dashboard/2'}
className={`link ${pathname === '/dashboard/2' ? styles.active : ''}`}
>
๋Œ€์‹œ๋ณด๋“œ2
</Link>
</div>
);
}
Loading