Skip to content
Merged
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
86 changes: 86 additions & 0 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
"@tanstack/react-query": "^5.80.2",
"axios": "^1.9.0",
"clsx": "^2.1.1",
"date-fns": "^4.1.0",
"next": "14.2.25",
"next-themes": "^0.4.6",
"react": "18.2.0",
"react-datepicker": "^8.4.0",
"react-dom": "18.2.0",
"react-hook-form": "^7.57.0",
"sonner": "^2.0.5",
Expand Down
4 changes: 2 additions & 2 deletions public/images/plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 0 additions & 46 deletions src/app/api/useCards.ts

This file was deleted.

32 changes: 0 additions & 32 deletions src/app/api/useColumns.ts

This file was deleted.

12 changes: 0 additions & 12 deletions src/app/dashboard/[id]/api/updateCardColumn.ts

This file was deleted.

17 changes: 17 additions & 0 deletions src/app/dashboard/[id]/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Header from '@components/common/header/Header'

import Sidebar from '@/app/shared/components/common/sidebar/Sidebar'

export default function AboutLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<div>
{/* <Sidebar /> */}
<Header />
<div>{children}</div> {/* 여기에 page.tsx λ‚΄μš©μ΄ λ“€μ–΄μ˜΄ */}
</div>
)
}
22 changes: 12 additions & 10 deletions src/app/dashboard/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
'use client'

import Image from 'next/image'
import { useParams } from 'next/navigation'
import { useRef } from 'react'

import useColumns from '@/app/api/useColumns'

import { useCardMutation } from './api/useCardMutation'
import Column from './Column/Column'
import { useDragStore } from './store/useDragStore'
import type { Card } from './type/Card'
import { useCardMutation } from '@/app/features/dashboard_Id/api/useCardMutation'
import useColumns from '@/app/features/dashboard_Id/api/useColumns'
import Column from '@/app/features/dashboard_Id/Column/Column'
import { useDragStore } from '@/app/features/dashboard_Id/store/useDragStore'
import { Card } from '@/app/features/dashboard_Id/type/Card.type'

export default function DashboardID() {
const dashboard = 15120
const { data: columns, isLoading, error } = useColumns(dashboard)
const params = useParams()
const dashboardId = Number(params.id)
const { data: columns, isLoading, error } = useColumns(dashboardId)
// const { data: columns, isLoading, error } = useColumns(id)

const { draggingCard, setDraggingCard } = useDragStore()
const cardMutation = useCardMutation()
const touchPos = useRef({ x: 0, y: 0 })
Expand Down Expand Up @@ -124,10 +127,9 @@ export default function DashboardID() {
if (error) return <p>error...{error.message}</p>
return (
<>
<div className="fixed left-0 h-1080 w-300 bg-gray-100">μ‚¬μ΄λ“œλ°”</div>
<div className="ml-300 select-none">
<div
className="tablet:flex-col flex"
className="flex min-h-[calc(100vh-100px)] tablet:flex-col"
onTouchStart={handleTouchStart}
onTouchMove={handleTouchMove}
onTouchEnd={handleTouchEnd}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function Tags({ tags }: { tags: string[] }) {
return (
<div className="flex flex-wrap gap-6">
{tags.map((tag) => {
const colorIndex = getColor(tag, bgColors)
const colorIndex = getColor(tag, bgColors.length)

return (
<span
Expand Down
29 changes: 29 additions & 0 deletions src/app/features/dashboardId/Card/cardFormModals/AssigneeList.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { cn } from '@/app/shared/lib/cn'
const mockData = ['aaa', 'bbb', 'ccc']

interface AssigneeListProps {
setSelectedAssignee: React.Dispatch<React.SetStateAction<string>>
}
export default function AssigneeList({
setSelectedAssignee,
}: AssigneeListProps) {
return (
<div className="BG-white Border-btn Text-gray absolute left-0 top-full z-10 mt-4 w-full rounded-6 text-14">
{mockData.map((Assignee, index) => (
<div
className={cn(
'BG-Input-hovered w-full cursor-pointer px-16 py-11 pt-14 placeholder-gray-400 caret-transparent',
index !== 0 && 'border-t',
)}
key={index}
onClick={() => {
setSelectedAssignee(Assignee)
console.log(Assignee)
}}
>
{Assignee}
</div>
))}
</div>
)
}
Loading
Loading