feat(project): init
This commit is contained in:
36
app/label/page.tsx
Normal file
36
app/label/page.tsx
Normal file
@@ -0,0 +1,36 @@
|
||||
"use client"
|
||||
|
||||
import LabelContent from "@/components/label"
|
||||
import { Paper } from "@mantine/core"
|
||||
import { useSearchParams } from "next/navigation"
|
||||
import { useMemo } from "react"
|
||||
|
||||
export default function LabelPage() {
|
||||
const searchParams = useSearchParams()
|
||||
const projectId = useMemo(() => {
|
||||
const value = Number(searchParams.get("project_id"))
|
||||
return Number.isFinite(value) ? value : -1
|
||||
}, [searchParams])
|
||||
const taskId = useMemo(() => {
|
||||
const value = Number(searchParams.get("task_id"))
|
||||
return Number.isFinite(value) ? value : -1
|
||||
}, [searchParams])
|
||||
|
||||
return (
|
||||
<Paper
|
||||
p={0}
|
||||
style={{
|
||||
width: "100%",
|
||||
height: "100vh",
|
||||
overflow: "hidden",
|
||||
borderRadius: 0,
|
||||
}}>
|
||||
<LabelContent
|
||||
headerHeight={0}
|
||||
leftWidth={0}
|
||||
project_id={projectId}
|
||||
task_id={taskId}
|
||||
/>
|
||||
</Paper>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user