fix(bug): fix router
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import { getPersonProjectDashBoard } from "@/components/label/api/project"
|
||||
import { Project } from "@/components/label/api/project/typing"
|
||||
import { Button, Group, Text, UnstyledButton } from "@mantine/core"
|
||||
import { Button, Group, Text } from "@mantine/core"
|
||||
|
||||
import { IconRefresh } from "@tabler/icons-react"
|
||||
import dayjs from "dayjs"
|
||||
@@ -76,15 +76,16 @@ export default function PersonalProjectTable() {
|
||||
width: 150,
|
||||
render: (record: Project.PersonProjectDashboardResponseItem) => {
|
||||
return (
|
||||
<UnstyledButton
|
||||
<Text
|
||||
px={6}
|
||||
variant="transparent"
|
||||
onClick={async () => {
|
||||
setCurrentRowId(record.project_id)
|
||||
router.push(`/project/info/detail?id=${record.project_id}`)
|
||||
false && setCurrentRowId(record.project_id)
|
||||
false &&
|
||||
router.push(`/project/info/detail?id=${record.project_id}`)
|
||||
}}
|
||||
title={record.project_id.toString()}
|
||||
c={"brand"}
|
||||
// c={"brand"}
|
||||
style={{
|
||||
fontSize: "14px",
|
||||
maxWidth: "100%",
|
||||
@@ -93,7 +94,7 @@ export default function PersonalProjectTable() {
|
||||
textOverflow: "ellipsis",
|
||||
}}>
|
||||
{record.project_id}
|
||||
</UnstyledButton>
|
||||
</Text>
|
||||
)
|
||||
},
|
||||
},
|
||||
|
||||
@@ -247,7 +247,10 @@ export default function PersonDashboardPage() {
|
||||
</SimpleGrid>
|
||||
</Group>
|
||||
|
||||
<SimpleGrid cols={{ base: 1, lg: 2 }} spacing="md" style={{ flex: 1 }}>
|
||||
<SimpleGrid
|
||||
cols={{ base: 1, lg: 2 }}
|
||||
spacing="md"
|
||||
style={{ flex: 1, maxHeight: "calc(100% - 194px)" }}>
|
||||
<Paper
|
||||
shadow="xs"
|
||||
withBorder
|
||||
|
||||
@@ -2,16 +2,16 @@ import AppLayout from "@/components/layout/AppLayout"
|
||||
import { PathnameRecorder } from "@/components/layout/PathnameRecorder"
|
||||
import { componentList, showList } from "@/components/layout/common"
|
||||
|
||||
async function getMenu() {
|
||||
return [...componentList, ...showList]
|
||||
}
|
||||
// async function getMenu() {
|
||||
// return [...componentList, ...showList]
|
||||
// }
|
||||
|
||||
export default async function Layout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
const menu = await getMenu()
|
||||
const menu = [...componentList, ...showList]
|
||||
return (
|
||||
<AppLayout menu={menu}>
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user