-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
3,890 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,50 @@ | ||
# claco-client | ||
# React + TypeScript + Vite | ||
|
||
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. | ||
|
||
Currently, two official plugins are available: | ||
|
||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh | ||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh | ||
|
||
## Expanding the ESLint configuration | ||
|
||
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: | ||
|
||
- Configure the top-level `parserOptions` property like this: | ||
|
||
```js | ||
export default tseslint.config({ | ||
languageOptions: { | ||
// other options... | ||
parserOptions: { | ||
project: ['./tsconfig.node.json', './tsconfig.app.json'], | ||
tsconfigRootDir: import.meta.dirname, | ||
}, | ||
}, | ||
}) | ||
``` | ||
|
||
- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked` | ||
- Optionally add `...tseslint.configs.stylisticTypeChecked` | ||
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config: | ||
|
||
```js | ||
// eslint.config.js | ||
import react from 'eslint-plugin-react' | ||
|
||
export default tseslint.config({ | ||
// Set the react version | ||
settings: { react: { version: '18.3' } }, | ||
plugins: { | ||
// Add the react plugin | ||
react, | ||
}, | ||
rules: { | ||
// other rules... | ||
// Enable its recommended rules | ||
...react.configs.recommended.rules, | ||
...react.configs['jsx-runtime'].rules, | ||
}, | ||
}) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import js from '@eslint/js'; | ||
import globals from 'globals'; | ||
import reactHooks from 'eslint-plugin-react-hooks'; | ||
import reactRefresh from 'eslint-plugin-react-refresh'; | ||
import tseslint from 'typescript-eslint'; | ||
|
||
export default tseslint.config( | ||
{ ignores: ['dist'] }, | ||
{ | ||
extends: [js.configs.recommended, ...tseslint.configs.recommended], | ||
files: ['**/*.{ts,tsx}'], | ||
languageOptions: { | ||
ecmaVersion: 2020, | ||
globals: globals.browser, | ||
}, | ||
plugins: { | ||
'react-hooks': reactHooks, | ||
'react-refresh': reactRefresh, | ||
}, | ||
rules: { | ||
...reactHooks.configs.recommended.rules, | ||
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }], | ||
}, | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Claco</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"name": "claco-client", | ||
"private": true, | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "tsc -b && vite build", | ||
"lint": "eslint .", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"@tanstack/react-query": "^5.59.0", | ||
"@types/node": "^22.7.4", | ||
"autoprefixer": "^10.4.20", | ||
"axios": "^1.7.7", | ||
"postcss": "^8.4.47", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"react-router-dom": "^6.26.2", | ||
"recoil": "^0.7.7", | ||
"tailwindcss": "^3.4.13" | ||
}, | ||
"devDependencies": { | ||
"@eslint/js": "^9.12.0", | ||
"@types/react": "^18.3.10", | ||
"@types/react-dom": "^18.3.0", | ||
"@typescript-eslint/parser": "^8.8.0", | ||
"@vitejs/plugin-react-swc": "^3.5.0", | ||
"eslint": "^9.12.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-import-resolver-typescript": "^3.6.3", | ||
"eslint-plugin-import": "^2.31.0", | ||
"eslint-plugin-prettier": "^5.2.1", | ||
"eslint-plugin-react": "^7.37.1", | ||
"eslint-plugin-react-hooks": "^4.6.2", | ||
"eslint-plugin-react-refresh": "^0.4.12", | ||
"globals": "^15.10.0", | ||
"prettier": "^3.3.3", | ||
"typescript": "^5.5.3", | ||
"typescript-eslint": "^8.8.0", | ||
"vite": "^5.4.8", | ||
"vite-plugin-svgr": "^4.2.0", | ||
"vite-tsconfig-paths": "^5.0.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { RouterProvider } from 'react-router-dom'; | ||
import AppRegister from '@/libraries/index'; | ||
import Router from '@/routes/router'; | ||
|
||
export default function App() { | ||
return ( | ||
<AppRegister> | ||
<RouterProvider router={Router} fallbackElement={null} /> | ||
</AppRegister> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
@layer base { | ||
@font-face { | ||
font-family: 'Pretendard'; | ||
src: url('https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/variable/pretendardvariable.min.css'); | ||
} | ||
html { | ||
font-size: 62.5%; | ||
font-family: pretendard; | ||
} | ||
body { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
|
||
border: 1px solid #222; | ||
|
||
max-width: 430px; | ||
min-height: 100vh; | ||
} | ||
} | ||
|
||
@layer components { | ||
.display1-bold { | ||
@apply text-[3.5rem] font-bold leading-normal tracking-[-0.01em]; | ||
} | ||
.display2-medium { | ||
@apply text-[2.5rem] font-bold leading-normal tracking-[-0.01em]; | ||
} | ||
.title1-bold { | ||
@apply text-[2rem] font-bold leading-normal tracking-[-0.01em]; | ||
} | ||
.title2-bold { | ||
@apply text-[1.75rem] font-bold leading-normal tracking-[-0.01em]; | ||
} | ||
.title3-bold { | ||
@apply text-[1.5rem] font-bold leading-normal tracking-[-0.01em]; | ||
} | ||
.heading1-bold { | ||
@apply text-[1.375rem] font-bold leading-normal tracking-[-0.01em]; | ||
} | ||
.heading1-semibold { | ||
@apply text-[1.375rem] font-semibold leading-normal tracking-[-0.01em]; | ||
} | ||
.heading2-bold { | ||
@apply text-[1.25rem] font-bold leading-normal tracking-[-0.01em]; | ||
} | ||
.heading2-semibold { | ||
@apply text-[1.25rem] font-semibold leading-normal tracking-[-0.01em]; | ||
} | ||
.headline1-bold { | ||
@apply text-[1.125rem] font-bold leading-normal tracking-[-0.01em]; | ||
} | ||
.headline2-bold { | ||
@apply text-[1.0625rem] font-bold leading-normal tracking-[-0.01em]; | ||
} | ||
.body1-medium { | ||
@apply text-[1rem] font-medium leading-normal tracking-[-0.01em]; | ||
} | ||
.body1-regular { | ||
@apply text-[1rem] font-regular leading-normal tracking-[-0.01em]; | ||
} | ||
.body2-medium { | ||
@apply text-[0.9375rem] font-medium leading-normal tracking-[-0.01em]; | ||
} | ||
.body2-regular { | ||
@apply text-[0.9375rem] font-regular leading-normal tracking-[-0.01em]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { PropsWithChildren } from 'react'; | ||
import { RecoilRoot } from 'recoil'; | ||
import ReactQuerySetting from '@/libraries/reactQuery/ReactQuerySetting'; | ||
|
||
export default function AppRegister({ children }: PropsWithChildren) { | ||
return ( | ||
<ReactQuerySetting> | ||
<RecoilRoot>{children}</RecoilRoot> | ||
</ReactQuerySetting> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { PropsWithChildren } from 'react'; | ||
|
||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; | ||
|
||
const MINUTES = 1000 * 60; | ||
|
||
const queryClient = new QueryClient({ | ||
defaultOptions: { | ||
queries: { | ||
retry: 1, | ||
retryDelay: 1000, | ||
staleTime: 5 * MINUTES, | ||
}, | ||
}, | ||
}); | ||
|
||
export default function ReactQuerySetting({ children }: PropsWithChildren) { | ||
return <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const enum QueryKeys {} | ||
|
||
export default QueryKeys; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { StrictMode } from 'react'; | ||
import { createRoot } from 'react-dom/client'; | ||
import App from './App.tsx'; | ||
import './globals.css'; | ||
|
||
createRoot(document.getElementById('root')!).render( | ||
<StrictMode> | ||
<App /> | ||
</StrictMode> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
export const LoginPage = () => { | ||
return ( | ||
<div> | ||
<p className="display1-bold">글자 크기</p> | ||
<p className="display2-medium">글자 크기</p> | ||
<p className="title1-bold">글자 크기</p> | ||
<p className="display1-bold">글자 크기</p> | ||
<p className="display2-medium">글자 크기</p> | ||
<p className="title1-bold">글자 크기</p> | ||
<p className="display1-bold">글자 크기</p> | ||
<p className="display2-medium">글자 크기</p> | ||
<p className="title1-bold">글자 크기</p> | ||
<p className="display1-bold">글자 크기</p> | ||
<p className="display2-medium">글자 크기</p> | ||
<p className="title1-bold">글자 크기</p> | ||
<p className="display1-bold">글자 크기</p> | ||
<p className="display2-medium">글자 크기</p> | ||
<p className="title1-bold">글자 크기</p> | ||
<p className="display1-bold">글자 크기</p> | ||
<p className="display2-medium">글자 크기</p> | ||
<p className="title1-bold">글자 크기</p> | ||
<p className="display1-bold">글자 크기</p> | ||
<p className="display2-medium">글자 크기</p> | ||
<p className="title1-bold">글자 크기</p> | ||
<p className="display1-bold">글자 크기</p> | ||
<p className="display2-medium">글자 크기</p> | ||
<p className="title1-bold">글자 크기</p> | ||
<p className="display1-bold">글자 크기</p> | ||
<p className="display2-medium">글자 크기</p> | ||
<p className="title1-bold">글자 크기</p> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { LoginPage } from '@/pages/Login/page'; | ||
import { createBrowserRouter, Outlet, RouteObject } from 'react-router-dom'; | ||
|
||
const routes: RouteObject[] = [ | ||
{ | ||
path: '/', | ||
element: <Outlet />, | ||
children: [ | ||
{ | ||
path: '', | ||
element: <LoginPage />, | ||
}, | ||
], | ||
}, | ||
{ path: '*', element: <>Not found page</> }, | ||
]; | ||
|
||
const Router = createBrowserRouter(routes); | ||
|
||
export default Router; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/// <reference types="vite/client" /> | ||
/// <reference types="vite-plugin-svgr/client" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** @type {import('tailwindcss').Config} */ | ||
export default { | ||
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'], | ||
theme: { | ||
extend: { | ||
height: { | ||
'real-screen': 'calc(var(--vh) * 100)', | ||
}, | ||
}, | ||
minHeight: { | ||
'real-screen': 'calc(var(--vh) * 100)', | ||
}, | ||
}, | ||
plugins: [], | ||
}; |
Oops, something went wrong.