Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunami97 committed Nov 28, 2024
2 parents 2480d06 + 45088bd commit 380246b
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 20 deletions.
33 changes: 33 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# dependencies
node_modules
.pnp
.pnp.js

# testing
coverage

# next.js
.next/
out/
build
dist

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local
.env

# typescript
*.tsbuildinfo
next-env.d.ts

# VSCode
.vscode
15 changes: 15 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "es5",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always",
"endOfLine": "lf",
"singleAttributePerLine": false
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
"source.fixAll.eslint": true,
},

// TypeScript 설정
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint-staged": "lint-staged",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
"format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"",
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
Expand Down Expand Up @@ -68,6 +70,7 @@
"eslint-plugin-storybook": "^0.11.1",
"husky": "^9.1.7",
"lint-staged": "^15.2.10",
"prettier": "^3.4.1",
"signal-exit": "^4.1.0",
"storybook": "^8.4.5",
"typescript": "^5.6.3",
Expand Down
37 changes: 18 additions & 19 deletions src/router/index.tsx
Original file line number Diff line number Diff line change
@@ -1,39 +1,38 @@
import RootLayout from "@/components/RootLayout";
import Login from "@/pages/Login";
import ChatList from "@/pages/ChatList";
import Main from "@/pages/Main";
import MyPage from "@/pages/MyPage";
import QSpaceMainPage from "@/pages/QSpaceMain";
import CategorySelectPage from "@/pages/QSpacePost/CategorySelectPage";
import NotificationPage from "@/pages/Alarm";
import RootLayout from '@/components/RootLayout';
import Login from '@/pages/Login';
import ChatList from '@/pages/ChatList';
import Main from '@/pages/Main';
import MyPage from '@/pages/MyPage';
import QSpaceMainPage from '@/pages/QSpaceMain';
import CategorySelectPage from '@/pages/QSpacePost/CategorySelectPage';
import NotificationPage from '@/pages/Alarm';
import PostGroupPage from '@/pages/QSpacePost/PostGroupPage';
import QuestionPage from "@/pages/Question";
import { createBrowserRouter } from "react-router-dom";


const router = createBrowserRouter([
{
path: "/",
path: '/',
element: <RootLayout />,
children: [
{
path: "",
path: '',
element: <Main />,
},
{
path: "/chat", // 채팅 목록
path: '/chat', // 채팅 목록
element: <ChatList />,
},
{
path: "/mypage", // 마이페이지
path: '/mypage', // 마이페이지
element: <MyPage />,
},
{
path: "/qspace",
path: '/qspace',
element: <QSpaceMainPage />,
},
{
path: "/qspace/category",
path: '/qspace/category',
element: <CategorySelectPage />,
},
{
Expand All @@ -45,12 +44,12 @@ const router = createBrowserRouter([
element: <Login />,
},
{
path: 'questions/:category',
element: <QuestionPage />,
path: '/Alarm',
element: <NotificationPage />,
},
{
path: "/Alarm",
element: <NotificationPage />,
path: '/questions/:category',
element: <QuestionPage />,
},
],
},
Expand Down
10 changes: 10 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9071,6 +9071,15 @@ __metadata:
languageName: node
linkType: hard

"prettier@npm:^3.4.1":
version: 3.4.1
resolution: "prettier@npm:3.4.1"
bin:
prettier: bin/prettier.cjs
checksum: 10c0/2d6cc3101ad9de72b49c59339480b0983e6ff6742143da0c43f476bf3b5ef88ede42ebd9956d7a0a8fa59f7a5990e8ef03c9ad4c37f7e4c9e5db43ee0853156c
languageName: node
linkType: hard

"pretty-bytes@npm:^5.3.0":
version: 5.6.0
resolution: "pretty-bytes@npm:5.6.0"
Expand Down Expand Up @@ -11075,6 +11084,7 @@ __metadata:
glob: "npm:^11.0.0"
husky: "npm:^9.1.7"
lint-staged: "npm:^15.2.10"
prettier: "npm:^3.4.1"
react: "npm:^18.3.1"
react-dom: "npm:^18.3.1"
react-hook-form: "npm:^7.53.2"
Expand Down

0 comments on commit 380246b

Please sign in to comment.