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

Deploy #361

Merged
merged 36 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
64c6100
[#287] ํ•™์ƒ GSM ์ธ์ฆ์ œ ํŽ˜์ด์ง€ ํผ๋ธ”๋ฆฌ์‹ฑ (#290)
googoo81 Jan 29, 2024
28b8af5
[#288] ์ฝ”๋“œ ์ŠคํŽ ๋ง ๋ฐ ๋‹จ์œ„ ์ˆ˜์ •, ์•ˆ์“ฐ๋Š” ํƒœ๊ทธ ์ œ๊ฑฐ (#291)
googoo81 Jan 30, 2024
2df0d83
[#293]์„ ์ƒ๋‹˜ ํšŒ์›๊ฐ€์ž… ์ถ”๊ฐ€ (#294)
mini-aron Apr 18, 2024
e5347af
[#295] ์˜์กด์„ฑ ์ถ”๊ฐ€ (#296)
chanwoo00106 May 24, 2024
dee8453
[#297] SMS ์ธ์ฆ์ œ Textfield ์ปดํฌ๋„ŒํŠธ ํผ๋ธ”๋ฆฌ์‹ฑ (#298)
Ethen1264 May 28, 2024
a986191
[#303] ํšŒ์›๊ฐ€์ž… ๋ฆฌ๋ Œ๋”๋ง ๋ฐ ์š”์ฒญ ๋ฌธ์ œ ํ•ด๊ฒฐ (#304)
mini-aron May 30, 2024
157e982
[#304] SMS ์ธ์ฆ์ œ ๋ฐ”๋กœ๊ฐ€๊ธฐ ๋ฒ„ํŠผ ์ œํ•œ (#309)
googoo81 May 31, 2024
40411c5
Merge branch 'master' into develop
googoo81 May 31, 2024
a131bf1
[#299] SMS ์ธ์ฆ์ œ toggle-button ์ปดํฌ๋„ŒํŠธ ํผ๋ธ”๋ฆฌ์‹ฑ (#300)
happytaeyoon Jun 2, 2024
bc68070
[#312] ๋งˆ์ดํŽ˜์ด์ง€ ์ˆ˜์ • ์š”๊ตฌ์‚ฌํ•ญ ๋ฐ˜์˜ (#314)
googoo81 Jun 3, 2024
f298012
editorconfig ์„ค์ • ์ˆ˜์ • (#321)
chanwoo00106 Jun 9, 2024
2d3ede1
[#311] ํŒŒ์ผ ๋‹ค์šด๋กœ๋“œ ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€ (#312)
chanwoo00106 Jun 10, 2024
c526b52
[#305] ์ธ์ฆ์ œ ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€ (#306)
chanwoo00106 Jun 10, 2024
28331d9
[#318] ๊ธฐ์—… ๊ณต์œ ์šฉ ํ•™์ƒ ํ”„๋กœํ•„ ํŽ˜์ด์ง€ ์ถ”๊ฐ€ (#319)
mini-aron Jun 14, 2024
433b317
[#323] ๋‹ค์ค‘ input ๋ฌธ์ œ ํ•ด๊ฒฐ (#324)
chanwoo00106 Jun 15, 2024
a969437
[#325] SegmentedControl ์ปดํฌ๋„ŒํŠธ ์ˆ˜์ • (#326)
chanwoo00106 Jun 15, 2024
aee9f79
[#329] remake select ์ปดํฌ๋„ŒํŠธ (#330)
chanwoo00106 Jun 16, 2024
76097cf
[#327] ํŒŒ์ผ ์ž…๋ ฅ ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€ (#328)
chanwoo00106 Jun 16, 2024
c1d9712
[#301] ํ”„๋กœํ•„ ๊ณต์œ  ๋ชจ๋‹ฌ ์ œ์ž‘ (#317)
Ethen1264 Jun 16, 2024
fd8d888
[#269, #277, #302] ssr ์ œ๊ฑฐ ๋ฐ private ํŽ˜์ด์ง€ ๊ฒ€์ฆ ์ˆ˜์ • (#322)
chanwoo00106 Jun 17, 2024
9d9ad8f
[#331] FileInput ๋ฌธ์ œ ํ•ด๊ฒฐ (#332)
chanwoo00106 Jun 19, 2024
18d7f96
redux ์„ค์ • ์ˆ˜์ • (#336)
chanwoo00106 Jun 21, 2024
cb4df4f
ErrorWrapper ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€ (#334)
chanwoo00106 Jun 21, 2024
7c14d12
[#337] hot reloader๊ฐ€ ๋Š๊ธฐ๋Š” ๋ฌธ์ œ ํ•ด๊ฒฐ (#338)
chanwoo00106 Jul 8, 2024
02ee2b7
[#341] ํŒŒ์ผ ์—…๋กœ๋“œ ๋ฌธ์ œ ํ•ด๊ฒฐ (#342)
chanwoo00106 Jul 10, 2024
0e3a6bc
[#339] ์ธ์ฆ์ œ ํ•™์ƒ ๋ฆฌ์ŠคํŠธ ํŽ˜์ด์ง€ ์ถ”๊ฐ€ (#340)
chanwoo00106 Jul 11, 2024
897b206
[#347] ํ•™์ƒ ์ธ์ฆ์ œ ์ ์ˆ˜ ์ž…๋ ฅ ํŽ˜์ด์ง€ ์ถ”๊ฐ€ (#348)
chanwoo00106 Jul 11, 2024
f053a77
[#345] ์ธ์ฆ์ œ ์ž…๋ ฅ ํŽ˜์ด์ง€ ์ถ”๊ฐ€ (#346)
chanwoo00106 Jul 11, 2024
d5532dc
[#349] next ์„œ๋ฒ„ ์—๋Ÿฌ ๋กœ๊ทธ ์ถ”๊ฐ€ (#350)
chanwoo00106 Jul 11, 2024
96f37ed
[#351] ๋กœ๊ทธ์ธ ๋ฌธ์ œ ํ•ด๊ฒฐ (#352)
chanwoo00106 Jul 11, 2024
f6fba88
[#353] ์ธ์ฆ์ œ ํŽ˜์ด์ง€ ์ ‘๊ทผ ๋ฌธ์ œ ํ•ด๊ฒฐ (#354)
chanwoo00106 Jul 13, 2024
7d51621
[#355] ์ธ์ฆ์ œ ์ ์ˆ˜ ์ž…๋ ฅ ๋ฒ„๊ทธ ํ•ด๊ฒฐ (#356)
chanwoo00106 Jul 18, 2024
611c17c
[#359] ํ•™์ƒ ๋””ํ…Œ์ผ ๋ชจ๋‹ฌ์— 0์ด ๋„์›Œ์ง€๋Š” ๋ฌธ์ œ ํ•ด๊ฒฐ (#360)
chanwoo00106 Aug 15, 2024
406d151
[#357] ํ•™์ƒ ๋ฆฌ์ŠคํŠธ ํŽ˜์ด์ง€ ๋ฒ„๊ทธ ์ˆ˜์ • (#358)
chanwoo00106 Aug 15, 2024
5981c89
[#343] ํฌํŠธํด๋ฆฌ์˜ค PDF ์—…๋กœ๋“œ ๊ธฐ๋Šฅ ์ถ”๊ฐ€ (#344)
mini-aron Aug 19, 2024
753afe2
Merge branch 'master' of https://github.com/GSM-MSG/SMS-FrontEnd intoโ€ฆ
chanwoo00106 Aug 19, 2024
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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ root = true
# ๋ชจ๋“  ํŒŒ์ผ์— ์ ์šฉ
[*]
end_of_line = lf
insert_final_newline = false
insert_final_newline = true
charset = utf-8
indent_size = 2
indent_style = tab
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/SMS-app-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 9.1.2
version: 9.4.0

- run: |
touch packages/app/.env.local
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/SMS-shared-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 9.1.2
version: 9.4.0

- run: pnpm i --frozen-lockfile
- run: pnpm build:shared
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.13.0
20
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@sms",
"version": "1.0.0",
"private": true,
"packageManager": "pnpm@9.1.2",
"packageManager": "pnpm@9.4.0",
"scripts": {
"format": "prettier --check --cache **/*.{tsx,ts}",
"eslint": "eslint --cache **/*.{tsx,ts}",
Expand Down Expand Up @@ -45,4 +45,4 @@
"storybook": "^7.4.0",
"typescript": "^5.0.4"
}
}
}
13 changes: 6 additions & 7 deletions packages/app/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ const nextConfig = {
formats: ['image/avif', 'image/webp'],
domains: [process.env.IMAGE_SERVER_DOMAIN],
},
async rewrites() {
return [
{
source: '/server/:path*', // ํ”„๋ก ํŠธ์—”๋“œ์—์„œ ์š”์ฒญํ•˜๋Š” ๊ฒฝ๋กœ์— ๋Œ€ํ•œ ๋ฆฌ๋‹ค์ด๋ ‰ํŠธ
destination: `${process.env.SERVER_URL}/:path*`, // ๋ฐฑ์—”๋“œ ๋„๋ฉ”์ธ
},
]
webpack: (config, { _isServer }) => {
config.module.rules.push({
test: /\.pdf$/,
use: 'file-loader',
})
return config
},
}

Expand Down
13 changes: 9 additions & 4 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,38 @@
"dependencies": {
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@hookform/error-message": "^2.0.1",
"@hookform/resolvers": "^3.4.2",
"@reduxjs/toolkit": "^1.9.3",
"@sms/shared": "workspace:*",
"@tanstack/react-query": "^5.37.1",
"axios": "^1.3.5",
"axios-retry": "^3.7.0",
"cookies": "^0.9.1",
"file-saver": "^2.0.5",
"jsonwebtoken": "^9.0.1",
"formidable": "^3.5.1",
"jsonwebtoken": "^9.0.2",
"lottie-web": "^5.12.2",
"next": "13.3.0",
"next-redux-wrapper": "^8.1.0",
"next": "13.5.6",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "^7.43.9",
"react-pdf": "^8.0.2",
"react-redux": "^8.0.5",
"sharp": "^0.32.5",
"zod": "^3.23.8"
},
"devDependencies": {
"@next/bundle-analyzer": "^13.5.2",
"@types/cookies": "^0.9.0",
"@types/file-saver": "^2.0.5",
"@types/formidable": "^3.4.5",
"@types/jsonwebtoken": "^9.0.2",
"@types/node": "^18.15.11",
"@types/qs": "^6.9.7",
"@types/react": "^18.0.33",
"@types/react-dom": "^18.0.11",
"cross-env": "^7.0.3",
"file-loader": "^6.2.0",
"typescript": "^5.0.4"
}
}
19 changes: 0 additions & 19 deletions packages/app/src/api/axiosApi.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,10 @@
import axios from 'axios'
import qs from 'qs'
import ParamsFilter from '@lib/ParamsFilter'
import axiosRetry from 'axios-retry'

const axiosApi = axios.create({
'axios-retry': {
retries: 3,
retryCondition: (e) => e.response?.status === 401,
},
paramsSerializer: (params) =>
qs.stringify(ParamsFilter(params), { arrayFormat: 'repeat' }),
})

axiosRetry(axiosApi, {
retries: 3,
retryDelay: (retryCount) => {
return retryCount * 1000
},
shouldResetTimeout: true,
retryCondition: (error) => {
return (
axiosRetry.isNetworkOrIdempotentRequestError(error) ||
error.response?.status === 401
)
},
})

export default axiosApi
1 change: 0 additions & 1 deletion packages/app/src/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export { default as axiosApi } from './axiosApi'
export { default as rtkApi } from './rtkApi'
10 changes: 0 additions & 10 deletions packages/app/src/api/rtkApi.ts

This file was deleted.

3 changes: 3 additions & 0 deletions packages/app/src/features/auth/dtos/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export { default as LoggedInResDto } from './res/LoggedInResDto'

export type { LoggedInResType } from './res/LoggedInResDto'
26 changes: 26 additions & 0 deletions packages/app/src/features/auth/dtos/res/LoggedInResDto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { z } from 'zod'
import Role from '@/types/Role'

const RoleSchema = z.enum([
Role.ROLE_STUDENT,
Role.ROLE_TEACHER,
Role.ROLE_DIRECTOR,
Role.ROLE_HOMEROOM,
Role.ROLE_PRINCIPAL,
Role.ROLE_DEPUTY_PRINCIPAL,
])

export const successDto = z.object({
isLoggedIn: z.literal(true),
role: RoleSchema,
})

export const failDto = z.object({
isLoggedIn: z.literal(false),
})

const LoggedInResDto = z.discriminatedUnion('isLoggedIn', [successDto, failDto])

export type LoggedInResType = z.infer<typeof LoggedInResDto>

export default LoggedInResDto
6 changes: 0 additions & 6 deletions packages/app/src/features/auth/hook/useAuth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@ import env from '@lib/env'
import { useEffect } from 'react'
import login from '@features/auth/service/login'
import { useToast } from '@features/toast'
import useLocalStorage from '@features/global/hooks/useLocalStorage'
import Token from '@lib/Token'
import useLoading from '@features/modal/hooks/useLoading'

const useAuth = () => {
const router = useRouter()
const code = router.query.code?.toString() || ''
const { addToast } = useToast()
const { loadingWrap, loadingClose } = useLoading()
const [_, setAccessExpires] = useLocalStorage(Token.ACCESS_TOKEN_EXP, '')
const [__, setRefreshExpires] = useLocalStorage(Token.REFRESH_TOKEN_EXP, '')

useEffect(() => {
if (!code) return
Expand All @@ -25,8 +21,6 @@ const useAuth = () => {
}
const redirectUrl =
res.role === 'ROLE_TEACHER' ? '/register/teacher' : '/register'
setAccessExpires(res.accessTokenExp)
setRefreshExpires(res.refreshTokenExp)
addToast('success', '๋กœ๊ทธ์ธ์— ์„ฑ๊ณตํ–ˆ์Šต๋‹ˆ๋‹ค')
await router.push(res.isExist ? '/' : redirectUrl)
loadingClose()
Expand Down
76 changes: 0 additions & 76 deletions packages/app/src/features/auth/hook/useAutoReissue.tsx

This file was deleted.

47 changes: 0 additions & 47 deletions packages/app/src/features/auth/hook/useLoggedIn.tsx

This file was deleted.

12 changes: 3 additions & 9 deletions packages/app/src/features/auth/hook/useLogout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@ import { useDialog } from '@hooks'
import { useToast } from '@features/toast'
import { useDispatch } from 'react-redux'
import { actions } from '@features/student/stores'
import { rtkApi } from '@api'
import useLocalStorage from '@features/global/hooks/useLocalStorage'
import Token from '@lib/Token'
import useLoggedInMutation from '@features/auth/queries/useLoggedInMutation'

const useLogout = () => {
const { dialog } = useDialog()
const { addToast } = useToast()
const dispatch = useDispatch()
const router = useRouter()
const [_, setAccess] = useLocalStorage(Token.ACCESS_TOKEN_EXP, '')
const [__, setRefresh] = useLocalStorage(Token.REFRESH_TOKEN_EXP, '')
const mutate = useLoggedInMutation()

const onLogout = async () => {
if (
Expand All @@ -28,12 +25,9 @@ const useLogout = () => {
const res = await logout()
if (res) return addToast('error', res)

setAccess('')
setRefresh('')
mutate()
addToast('success', '๋กœ๊ทธ์•„์›ƒ์— ์„ฑ๊ณตํ–ˆ์Šต๋‹ˆ๋‹ค')
dispatch(actions.resetPage())
dispatch(actions.resetStudents())
dispatch(rtkApi.util.resetApiState())

router.push('/')
}
Expand Down
3 changes: 0 additions & 3 deletions packages/app/src/features/auth/hook/useWithdraw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ import { useToast } from '@features/toast'
import { useDialog } from '@hooks'
import { useDispatch } from 'react-redux'
import { actions } from '@features/student/stores'
import useLoggedIn from './useLoggedIn'

const useWithdraw = () => {
const { dialog } = useDialog()
const { addToast } = useToast()
const dispatch = useDispatch()
const { refetchLoggedIn } = useLoggedIn({})
const router = useRouter()

const onWithdraw = async () => {
Expand All @@ -29,7 +27,6 @@ const useWithdraw = () => {
dispatch(actions.resetPage())
dispatch(actions.resetStudents())
router.push('/')
refetchLoggedIn()
}

return { onWithdraw }
Expand Down
Loading
Loading