mirror of
https://github.com/docmost/docmost.git
synced 2026-08-28 17:27:06 +08:00
refactor(base): rename /base/:baseId param to :pageId
This commit is contained in:
@@ -105,7 +105,7 @@ export default function App() {
|
|||||||
element={<Page />}
|
element={<Page />}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Route path={"/base/:baseId"} element={<BasePage />} />
|
<Route path={"/base/:pageId"} element={<BasePage />} />
|
||||||
|
|
||||||
<Route path={"/settings"}>
|
<Route path={"/settings"}>
|
||||||
<Route path={"account/profile"} element={<AccountSettings />} />
|
<Route path={"account/profile"} element={<AccountSettings />} />
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import { BaseTable } from "@/features/base/components/base-table";
|
|||||||
import { useBaseQuery } from "@/features/base/queries/base-query";
|
import { useBaseQuery } from "@/features/base/queries/base-query";
|
||||||
|
|
||||||
export default function BasePage() {
|
export default function BasePage() {
|
||||||
const { baseId } = useParams<{ baseId: string }>();
|
const { pageId } = useParams<{ pageId: string }>();
|
||||||
const { data: base } = useBaseQuery(baseId);
|
const { data: base } = useBaseQuery(pageId);
|
||||||
|
|
||||||
if (!baseId) {
|
if (!pageId) {
|
||||||
return (
|
return (
|
||||||
<Stack align="center" p="xl">
|
<Stack align="center" p="xl">
|
||||||
<Text c="dimmed">No base ID provided</Text>
|
<Text c="dimmed">No base ID provided</Text>
|
||||||
@@ -26,7 +26,7 @@ export default function BasePage() {
|
|||||||
{base.icon ? `${base.icon} ` : ""}{base.name}
|
{base.icon ? `${base.icon} ` : ""}{base.name}
|
||||||
</Title>
|
</Title>
|
||||||
)}
|
)}
|
||||||
<BaseTable baseId={baseId} />
|
<BaseTable pageId={pageId} />
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user