Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

전병주 과제 제출합니다. #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
24 changes: 24 additions & 0 deletions 전병주/assignment07/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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?
50 changes: 50 additions & 0 deletions 전병주/assignment07/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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,
},
})
```
31 changes: 31 additions & 0 deletions 전병주/assignment07/db.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"Hobby": [
{
"name": "전병주",
"id": 1,
"age": 23,
"hobby": "당구",
"phoneNumber": "010-9165-7205",
"email": "[email protected]",
"withMe": "O"
},
{
"name": "호날두",
"id": 2,
"age": 3,
"hobby": "야구",
"phoneNumber": "51515",
"email": "ㅇㄹ@ㅇㄹㄴㅁㄹ.dsfsf",
"withMe": "O"
},
{
"name": "메시",
"id": 3,
"age": 3,
"hobby": "축구",
"phoneNumber": "51515",
"email": "ㅇㄹ@ㅇㄹㄴㅁㄹ.dsfsf",
"withMe": "O"
}
]
}
28 changes: 28 additions & 0 deletions 전병주/assignment07/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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 },
],
},
},
)
13 changes: 13 additions & 0 deletions 전병주/assignment07/index.html
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>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
32 changes: 32 additions & 0 deletions 전병주/assignment07/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "assignment07",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview"
},
"dependencies": {
"axios": "^1.7.8",
"json-server": "0.17.4",
"less": "^4.2.1",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@eslint/js": "^9.15.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react-swc": "^3.5.0",
"eslint": "^9.15.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.14",
"globals": "^15.12.0",
"typescript": "~5.6.2",
"typescript-eslint": "^8.15.0",
"vite": "^6.0.1"
}
}
1 change: 1 addition & 0 deletions 전병주/assignment07/public/vite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
87 changes: 87 additions & 0 deletions 전병주/assignment07/src/App.module.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
.html,
body {
display: flex;
margin: 0;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}

.container {
display: flex;
justify-content: center;
align-items: center;
width: 800px;
height: 750px;
border: 3px solid #dee2e6;
flex-direction: column;
}

.header {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 15%;
background-color: rgba(102, 140, 255);
color: white;
font-size: 14px;
flex-direction: column;

button {
background-color: white;
color: rgba(102, 140, 255);
width: 30%;
height: 30px;
border-color: rgba(102, 140, 255);
}
}
.body {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 85%;
background-color: white;
color: rgba(102, 140, 255);
font-size: 14px;
flex-direction: row;
.userName {
font-size: 22px;
}

.left {
display: flex;
align-items: center;
width: 50%;
height: 100%;
row-gap: 10px;
padding-left: 30px;
}

.right {
display: flex;
justify-content: center;
align-items: center;
width: 50%;
height: 100%;
flex-direction: column;
row-gap: 14px;
}

input {
width: 60%;
height: 30px;
border-radius: 1px solid white;
font-size: 12px;
}

button {
background-color: rgba(102, 140, 255);
color: white;
width: 60%;
height: 30px;
border-color: white;
}
}
Loading