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

TTRN-678: Viteによる書き直し・リファクタ #14

Open
wants to merge 58 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 55 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
81e664f
refactor: use vite
3c1u Jul 25, 2023
9d8e644
remove: .eslintrc.cjs
3c1u Jul 25, 2023
ed07c2f
update: config
3c1u Jul 25, 2023
374380b
update: index.css
3c1u Jul 25, 2023
68a10e2
update: rewrite Header
3c1u Jul 25, 2023
79af048
refactor: rewrite login/logut
3c1u Jul 25, 2023
6682ff9
refactor: rewrite auth
3c1u Jul 25, 2023
a1d442b
refactor: use createRoot()
3c1u Jul 25, 2023
cb100e7
remove: const.js
3c1u Jul 25, 2023
ebc5aff
rename: Header.module.css
3c1u Jul 28, 2023
5d3f83f
refactor: use reset css
3c1u Jul 28, 2023
52f16ad
update: style
3c1u Jul 28, 2023
5cd06c8
add: sidebar mock
3c1u Jul 28, 2023
d8efc41
add: Inter font
3c1u Jul 28, 2023
ff6dd0f
fix: specify fallback
3c1u Jul 28, 2023
191c2f6
fix: smaller height screen
3c1u Jul 28, 2023
6204207
update: add sidebar states
3c1u Jul 28, 2023
05b49ec
fix: login and logout
3c1u Jul 28, 2023
6c73373
fix: layout
3c1u Jul 28, 2023
3803f84
refactor: rewrite login/signup
3c1u Jul 28, 2023
a84a717
fix: navigation
3c1u Jul 28, 2023
19597a7
remove: header
3c1u Jul 28, 2023
2755842
fix: top navigation
3c1u Jul 28, 2023
23e9521
fix: allow custom accent color
3c1u Jul 28, 2023
47f665b
add: list store
3c1u Jul 28, 2023
25aa8c5
add: todo slice
3c1u Jul 28, 2023
e365007
fix: remove unused variables
3c1u Jul 28, 2023
7a799ff
update: create list using redux
3c1u Jul 28, 2023
9793eec
fix: post login/logout
3c1u Jul 28, 2023
3aea109
fix: reroute
3c1u Jul 28, 2023
26e6237
add: list index
3c1u Jul 28, 2023
8976d08
fix: loading
3c1u Jul 28, 2023
e7721dc
refactor: add autoComplete
3c1u Jul 28, 2023
24b6623
update: add comments
3c1u Jul 28, 2023
b16fd70
add: task item
3c1u Jul 28, 2023
b74d17c
add: icons
3c1u Jul 28, 2023
2e90395
fix: sidebar buttons
3c1u Jul 28, 2023
0515edc
add: actions stub
3c1u Jul 28, 2023
f9bd6e1
fix: remove loading guard
3c1u Jul 29, 2023
ecf5dde
update: edit list
3c1u Jul 29, 2023
64c74c6
remove: old task creation
3c1u Jul 29, 2023
2ff09b2
remove: index.css
3c1u Jul 29, 2023
15fb844
add: TaskCreateForm
3c1u Jul 29, 2023
34a171a
fix: add focus ring
3c1u Jul 29, 2023
5f26127
remove: trash
3c1u Jul 29, 2023
5d9bbf1
update: task complete
3c1u Jul 29, 2023
afa1d42
fix: properly add id from response
3c1u Jul 29, 2023
49c0482
add: task edit
3c1u Jul 31, 2023
46bc0a5
fix: infinite load
3c1u Jul 31, 2023
a8f0933
refactor: todo -> task
3c1u Jul 31, 2023
be67ebc
refactor: description -> detail
3c1u Jul 31, 2023
4d223b6
fix: rename glitch
3c1u Jul 31, 2023
156379e
refactor: use controlled form
3c1u Jul 31, 2023
47f043e
fix: check token before fetch
3c1u Aug 1, 2023
87462a9
fix: use normal css
3c1u Aug 1, 2023
87cfcec
fix: typo
3c1u Aug 8, 2023
2e62f43
fix: downgrade react
3c1u Aug 8, 2023
c82f18b
fix: downgrade react-router
3c1u Aug 8, 2023
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
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_API_URL=""
1 change: 0 additions & 1 deletion .env.sample

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# production
/build
/dist

# misc
.DS_Store
Expand Down
7 changes: 7 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!DOCTYPE html>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hello React</title>
<div id="root"></div>
<script type="module" src="/src/index.jsx"></script>
11 changes: 11 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"compilerOptions": {
"target": "es2022",
"allowSyntheticDefaultImports": false,
"baseUrl": "./",
"paths": {
"~/*": ["src/*"]
}
},
"exclude": ["node_modules", "dist"]
}
45 changes: 24 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,36 @@
"name": "railway-todo-app",
"version": "0.1.0",
"private": true,
"type": "module",
"dependencies": {
"@reduxjs/toolkit": "^1.8.2",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.0",
"axios": "^0.27.2",
"react": "^17.0.2",
"@fontsource/inter": "^5.0.5",
"@reduxjs/toolkit": "^1.9.5",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@unocss/reset": "^0.53.6",
"axios": "^1.4.0",
"react": "^18.2.0",
"react-cookie": "^4.1.1",
"react-dom": "^17.0.2",
"react-redux": "^8.0.2",
"react-router-dom": "^5.3.0",
"web-vitals": "^2.1.4"
"react-dom": "^18.2.0",
"react-redux": "^8.1.1",
"react-router-dom": "^6.14.2"
},
"devDependencies": {
"react-scripts": "5.0.1"
"@vitejs/plugin-react-swc": "^3.3.2",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"prettier": "^3.0.0",
Comment on lines +18 to +23
Copy link
Contributor

@sugitlab sugitlab Aug 7, 2023

Choose a reason for hiding this comment

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

ask: station2で eslint, prettier の導入があるのであとではずす想定かなと理解してます。

Copy link
Author

Choose a reason for hiding this comment

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

他が問題なさそうならインデントをわざと崩した後に除去する予定です

"vite": "^4.4.5"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
"start": "vite",
"dev": "vite",
"build": "vite build",
"lint": "eslint ./src --ext js,jsx --report-unused-disable-directives --max-warnings 0"
},
"browserslist": {
"production": [
Expand Down
Binary file removed public/favicon.ico
Binary file not shown.
43 changes: 0 additions & 43 deletions public/index.html

This file was deleted.

Binary file removed public/logo192.png
Binary file not shown.
Binary file removed public/logo512.png
Binary file not shown.
25 changes: 0 additions & 25 deletions public/manifest.json

This file was deleted.

3 changes: 0 additions & 3 deletions public/robots.txt

This file was deleted.

Empty file removed src/App.css
Empty file.
12 changes: 0 additions & 12 deletions src/App.js

This file was deleted.

20 changes: 20 additions & 0 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { useDispatch } from 'react-redux'
import { Router } from './routes/Router'
import { useEffect } from 'react'
import { fetchUser } from '~/store/auth/index'

function App() {
const dispatch = useDispatch()

useEffect(() => {
void dispatch(fetchUser())
}, [])

return (
<div className="App">
<Router />
</div>
)
}

export default App
8 changes: 0 additions & 8 deletions src/App.test.js

This file was deleted.

23 changes: 0 additions & 23 deletions src/authSlice.js

This file was deleted.

16 changes: 16 additions & 0 deletions src/components/BackButton.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.back_button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--indigo-600);
width: fit-content;
}

.back_button:hover {
cursor: pointer;
opacity: 0.8;
}

.back_button__icon {
fill: currentColor;
}
15 changes: 15 additions & 0 deletions src/components/BackButton.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { ChevronIcon } from '~/icons/ChevronIcon'
import './BackButton.css'

const handleClick = () => {
window.history.back()
}

export const BackButton = () => {
return (
<button type="button" onClick={handleClick} className="back_button">
<ChevronIcon className="back_button__icon" />
Back
</button>
)
}
25 changes: 0 additions & 25 deletions src/components/Header.jsx

This file was deleted.

Loading