Skip to content

Commit

Permalink
rename to DashboardLayout for improved readability
Browse files Browse the repository at this point in the history
  • Loading branch information
adriangohjw committed Jan 13, 2025
1 parent 6f75f77 commit 440058c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from "@chakra-ui/react"
import { Breadcrumb } from "@opengovsg/design-system-react"

export const Dashboard = ({
export const DashboardLayout = ({
breadcrumbs,
icon,
title,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { PermissionsBoundary } from "~/components/AuthWrappers"
import { folderSettingsModalAtom } from "~/features/dashboard/atoms"
import { CollectionBanner } from "~/features/dashboard/components/CollectionBanner"
import { CollectionTable } from "~/features/dashboard/components/CollectionTable"
import { Dashboard } from "~/features/dashboard/components/Dashboard"
import { DashboardLayout } from "~/features/dashboard/components/DashboardLayout"
import { DeleteResourceModal } from "~/features/dashboard/components/DeleteResourceModal/DeleteResourceModal"
import { FolderSettingsModal } from "~/features/dashboard/components/FolderSettingsModal"
import { PageSettingsModal } from "~/features/dashboard/components/PageSettingsModal"
Expand Down Expand Up @@ -41,7 +41,7 @@ const CollectionResourceListPage: NextPageWithLayout = () => {

return (
<>
<Dashboard
<DashboardLayout
breadcrumbs={[
{
href: `/sites/${siteId}`,
Expand Down Expand Up @@ -75,7 +75,7 @@ const CollectionResourceListPage: NextPageWithLayout = () => {
preTableContent={<CollectionBanner />}
>
<CollectionTable resourceId={resourceId} siteId={siteId} />
</Dashboard>
</DashboardLayout>
<CreateCollectionPageModal
isOpen={isPageCreateModalOpen}
onClose={onPageCreateModalClose}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { z } from "zod"
import type { RouterOutput } from "~/utils/trpc"
import { PermissionsBoundary } from "~/components/AuthWrappers"
import { folderSettingsModalAtom } from "~/features/dashboard/atoms"
import { Dashboard } from "~/features/dashboard/components/Dashboard"
import { DashboardLayout } from "~/features/dashboard/components/DashboardLayout"
import { DeleteResourceModal } from "~/features/dashboard/components/DeleteResourceModal/DeleteResourceModal"
import { FolderSettingsModal } from "~/features/dashboard/components/FolderSettingsModal"
import { PageSettingsModal } from "~/features/dashboard/components/PageSettingsModal"
Expand Down Expand Up @@ -100,7 +100,7 @@ const FolderPage: NextPageWithLayout = () => {

return (
<>
<Dashboard
<DashboardLayout
breadcrumbs={breadcrumbs.concat({
href: getFolderHref(siteId, folderId),
label: title,
Expand Down Expand Up @@ -157,7 +157,7 @@ const FolderPage: NextPageWithLayout = () => {
siteId={parseInt(siteId)}
resourceId={parseInt(folderId)}
/>
</Dashboard>
</DashboardLayout>
<CreatePageModal
isOpen={isPageCreateModalOpen}
onClose={onPageCreateModalClose}
Expand Down
6 changes: 3 additions & 3 deletions apps/studio/src/pages/sites/[siteId]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { BiData, BiFileBlank, BiFolder, BiHomeAlt } from "react-icons/bi"
import { z } from "zod"

import { PermissionsBoundary } from "~/components/AuthWrappers"
import { Dashboard } from "~/features/dashboard/components/Dashboard"
import { DashboardLayout } from "~/features/dashboard/components/DashboardLayout"
import { DeleteResourceModal } from "~/features/dashboard/components/DeleteResourceModal/DeleteResourceModal"
import { FolderSettingsModal } from "~/features/dashboard/components/FolderSettingsModal"
import { PageSettingsModal } from "~/features/dashboard/components/PageSettingsModal"
Expand Down Expand Up @@ -97,7 +97,7 @@ const SitePage: NextPageWithLayout = () => {

return (
<>
<Dashboard
<DashboardLayout
breadcrumbs={[
{
href: `/sites/${siteId}`,
Expand All @@ -116,7 +116,7 @@ const SitePage: NextPageWithLayout = () => {
preTableContent={<RootpageRow siteId={siteId} />}
>
<ResourceTable siteId={siteId} />
</Dashboard>
</DashboardLayout>
<CreatePageModal
isOpen={isPageCreateModalOpen}
onClose={onPageCreateModalClose}
Expand Down

0 comments on commit 440058c

Please sign in to comment.