-
Notifications
You must be signed in to change notification settings - Fork 0
[FEAT] 슈퍼 유저 관리자 권한 1차 스펙 #85
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
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
c8b579c
feat: 설정 버튼 플로터 UI 개발
Emithen ed6ee15
feat: 게시글 삭제 모달
Emithen a19317c
feat: profile 타입 재정의 / 앱 마운트 시 인증 및 프로필 정보 복구 로직 추가
Emithen a3ae980
feat: mock data 대체 및 테스트용 흐름 삭제
Emithen 7be5fe1
feat: 인기 급상승 게시물 고정 여부 확인 UI
Emithen 1d859a4
refactor: 메시지 변수로 받는 확인 모달 작업
Emithen e558c5b
refactor: 컴포넌트 트리 구조 조정
Emithen 120f098
fix: role 타입 변경 사항 처리 중간 커밋
Emithen 1980db2
refactor: member 쪽 타입 정리
Emithen a1c5117
refactor: edit page 타입 변경 사항 적용
Emithen fe96f36
refactor: profile 타입 도메인 기반으로 변경
Emithen 3119937
feat: 인기 급상승 고정 버튼 UI
Emithen e823b59
feat: 고정 선택 드롭다운 메뉴 UI 개발
Emithen c5b9e30
feat: 고정 선택 변경 API 연동
Emithen dc7c3fd
feat: 서버 상태 변경 후 새로고침
Emithen 94f3bbd
feat: 고정 해제 로직
Emithen 0837ac9
feat: UI 노출 관리자 사용자에 대해서만 허용
Emithen 06311e5
feat: 핫이슈 페이지에서 고정 타입 확인
Emithen d53a464
feat: 핫이슈 페이지 고정 해제 기능
Emithen 0441e4b
feat: 핀 버튼 디자인 수정
Emithen 52edce5
fix: mbti 타입 일치
Emithen 5cc791b
fix: 고정 해제 api 호출 예외처리
Emithen e255407
feat: react hooks 규칙
Emithen 4ad7d75
feat: 고정 기능 예외 처리 추가
Emithen f85f4e7
fix: early return 제거
Emithen 8d0fcd4
fix: dev 머지
Emithen a904a5f
fix: 핫이슈 페이지 데이터 리페치
Emithen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 hidden or 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
This file contains hidden or 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,55 @@ | ||
| export type CreateMemberProfileRequest = { | ||
| nickname: string | ||
| gender: 'FEMALE' | 'MALE' | ||
| age: 'TEN' | 'TWENTY' | 'THIRTY' | 'OVER_FOURTY' | ||
| mbtiIe: 'I' | 'E' | ||
| mbtiTf: 'T' | 'F' | ||
| mbti: | ||
| | 'ISTJ' | ||
| | 'ISTP' | ||
| | 'ISFJ' | ||
| | 'ISFP' | ||
| | 'INTJ' | ||
| | 'INTP' | ||
| | 'INFJ' | ||
| | 'INFP' | ||
| | 'ESTJ' | ||
| | 'ESTP' | ||
| | 'ESFJ' | ||
| | 'ESFP' | ||
| | 'ENTJ' | ||
| | 'ENTP' | ||
| | 'ENFJ' | ||
| | 'ENFP' | ||
| role: 'USER' | 'ADMIN' | ||
| } | ||
|
|
||
| export type FetchMemberProfileResponse = { | ||
| profile: { | ||
| nickname: string | ||
| gender: 'FEMALE' | 'MALE' | ||
| age: 'TEN' | 'TWENTY' | 'THIRTY' | 'OVER_FOURTY' | ||
| mbtiIe: 'I' | 'E' | ||
| mbtiTf: 'T' | 'F' | ||
| mbti: | ||
| | 'ISTJ' | ||
| | 'ISTP' | ||
| | 'ISFJ' | ||
| | 'ISFP' | ||
| | 'INTJ' | ||
| | 'INTP' | ||
| | 'INFJ' | ||
| | 'INFP' | ||
| | 'ESTJ' | ||
| | 'ESTP' | ||
| | 'ESFJ' | ||
| | 'ESFP' | ||
| | 'ENTJ' | ||
| | 'ENTP' | ||
| | 'ENFJ' | ||
| | 'ENFP' | ||
| role: 'USER' | 'ADMIN' | ||
| } | ||
| } | ||
|
|
||
| export type UpdateMemberProfileRequest = CreateMemberProfileRequest | ||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,22 @@ | ||
| // app/authBootstrap.tsx | ||
| 'use client' | ||
|
|
||
| import { useEffect } from 'react' | ||
| import { useAppDispatch } from '@/hooks/utils/useAppDispatch' | ||
| import { fetchProfileThunk } from '@/store/thunks/memberThunks' | ||
| import { getAccessToken } from '@/utils/tokenUtils' | ||
|
|
||
| export default function AuthBootstrap() { | ||
| const dispatch = useAppDispatch() | ||
|
|
||
| useEffect(() => { | ||
| // 새로고침 시 profile 가져오기 | ||
| if (getAccessToken()) { | ||
| // access token 이 없으면 로그인 페이지로 이동하기 때문에 아무것도 할 필요없음 | ||
| // access token 이 있으면 해당 token 으로 profile 조회 시도 | ||
| dispatch(fetchProfileThunk()) | ||
| } | ||
| }, [dispatch]) | ||
Emithen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| return null | ||
| } | ||
This file contains hidden or 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
This file contains hidden or 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,8 +1,15 @@ | ||
| 'use client' | ||
| import { Provider } from 'react-redux' | ||
| import { store } from '../store/store' | ||
| import AuthBootstrap from './authBootstrap' | ||
|
|
||
| const Providers = ({ children }: { children: React.ReactNode }) => { | ||
| return <Provider store={store}>{children}</Provider> | ||
| return ( | ||
| <Provider store={store}> | ||
| {/* 앱 시작 시 또는 새로고침 시 인증/프로필 복구 로직 */} | ||
| <AuthBootstrap /> | ||
| {children} | ||
| </Provider> | ||
| ) | ||
| } | ||
| export default Providers |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
상수로 한번 뺴주시죵