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

issue#82 게시글 리팩토링 #83

Merged
merged 18 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
af2684c
Chore: shadcn Calendar 버전 업그레이드
ppochaco Jan 10, 2025
c240c40
Chore: .gitignore에 models 폴더 추가
ppochaco Jan 10, 2025
b8cf9a9
Rename: ActivityDateDialog 컴포넌트 위치 수정
ppochaco Jan 10, 2025
33c70b7
Rename: activity create post 관련 컴포넌트 구조 변경
ppochaco Jan 10, 2025
edb30ce
Refactor(activity): 활동 게시글 생성하기 request 수정
ppochaco Jan 10, 2025
9fbd3f3
Rename: 활동 게시글 관련 컴포넌트 구조 수정
ppochaco Jan 10, 2025
7b882f5
Refactor: 게시글 공통 table 컴포넌트 props 제너릭으로 수정
ppochaco Jan 10, 2025
d19501b
Refactor(activity): 활동 게시글 목록 조회 response 수정
ppochaco Jan 10, 2025
7544591
Refactor(activity): 활동 게시글 단일 조회 API 수정
ppochaco Jan 10, 2025
7727029
Fix: 활동 게시글 생성 후 초기화 할 게시글 목록 query 수정
ppochaco Jan 10, 2025
b891bd4
Fix: 게시글 공통 table type 추가
ppochaco Jan 10, 2025
3578f66
Feat: 게시글 삭제 시 확인창 추가
ppochaco Jan 10, 2025
96a149a
Rename(activity): 활동 게시글 단일 조회 관련 컴포넌트 구조 수정
ppochaco Jan 10, 2025
2249191
Refactor(notice): 공지사항 게시글 관련 API 수정
ppochaco Jan 10, 2025
461ff34
Refactor: 게시글 삭제 확인창 공통 컴포넌트로 분리
ppochaco Jan 10, 2025
f55c2ac
Fix: 공통 컴포넌트 PostDeleteDialog에 'use-client' 추가
ppochaco Jan 10, 2025
92e1408
Fix: props 타입 interface로 변경
ppochaco Jan 10, 2025
8ab4f74
Fix: props 타입 interface로 변경2
ppochaco Jan 10, 2025
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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@ yarn-error.log*

# typescript
*.tsbuildinfo
next-env.d.ts
next-env.d.ts

# api docs
Comment on lines +35 to +38
Copy link
Collaborator

Choose a reason for hiding this comment

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

해당 파일들에 eslint 관련 disable 속성이 많이 적용되어있는것 같은데, eslintignore 파일도 생성해서 무시 파일에 추가하는건 어떨까요?

Copy link
Member Author

Choose a reason for hiding this comment

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

해당 파일은 저희가 직접 작성하는 게 아니라, 라이브러리에서 작성해주는 파일이니까 따로 eslintignore에 파일을 추가할 필요는 없을 거 같아요..!

/src/models
162 changes: 114 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-radio-group": "^1.2.0",
"@radix-ui/react-select": "^2.1.1",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-slot": "^1.1.1",
"@radix-ui/react-tabs": "^1.1.0",
"@radix-ui/react-toast": "^1.2.4",
"@tanstack/react-query": "^5.51.21",
Expand All @@ -38,7 +38,7 @@
"next": "^14.2.21",
"next-safe-action": "^7.4.0",
"react": "^18",
"react-day-picker": "^9.0.8",
"react-day-picker": "^8.10.1",
"react-dom": "^18",
"react-hook-form": "^7.52.1",
"swagger-typescript-api": "^13.0.23",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { useMutation, useQuery } from '@tanstack/react-query'
import { usePathname, useRouter } from 'next/navigation'

import {
ActivityBreadcrumb,
BoardHeroSkeleton,
NameLabel,
} from '@/components/feature'
import { ActivityBreadcrumb, NameLabel } from '@/components/feature'
import { Button, Separator, useToast } from '@/components/ui'
import { DATA_ERROR_MESSAGES } from '@/constant/errorMessage'
import { queryClient } from '@/lib/query-client'
Expand Down Expand Up @@ -81,3 +77,14 @@ export const BoardHero = ({ boardId, activityId }: BoardHeroProps) => {
</div>
)
}

export const BoardHeroSkeleton = () => {
return (
<div className="flex flex-col">
<Separator variant="dark" />
<div className="h-40"></div>
<div className="h-0.5"></div>
<Separator variant="dark" />
</div>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const CreatePostButton = () => {
const pathName = usePathname()
const router = useRouter()

const { role } = useMyInfoStore.getState().myInfo
const { role } = useMyInfoStore((state) => state.myInfo)

return (
<div className="mb-20 flex justify-end">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useQuery } from '@tanstack/react-query'
import { useSearchParams } from 'next/navigation'

import { PaginationButtons } from '@/components/common'
import { PaginationButtons, Spinner } from '@/components/common'
import { PostTable } from '@/components/feature'
import { DATA_ERROR_MESSAGES } from '@/constant/errorMessage'
import { activityPostQuries } from '@/service/api'
Expand All @@ -22,7 +22,11 @@ export const ActivityPostListSection = ({
const { data, status } = useQuery(activityPostQuries.list({ boardId, page }))

if (status === 'pending')
return <div className="flex w-full justify-center">loading...</div>
return (
<div className="flex w-full justify-center">
<Spinner />
</div>
)

if (!data) {
throw new Error(DATA_ERROR_MESSAGES.POST_NOT_FOUND)
Expand Down

This file was deleted.

Loading
Loading