Skip to content

Commit 438bf48

Browse files
committed
ui cleanup
1 parent 7f325f2 commit 438bf48

5 files changed

Lines changed: 18 additions & 93 deletions

File tree

packages/app/src/app/(app)/explore/page.tsx

Lines changed: 0 additions & 26 deletions
This file was deleted.

packages/app/src/app/(app)/projects/[projectId]/activity/page.tsx

Lines changed: 0 additions & 45 deletions
This file was deleted.

packages/app/src/app/(app)/projects/[projectId]/dashboard/page.tsx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import "maplibre-gl/dist/maplibre-gl.css";
22
import { PageFrame } from "@/components/common/page-frame";
33
import { parseStringParam } from "@/lib/routing";
44
import { LayoutDashboard } from "lucide-react";
5-
import ProjectMap from "./map";
65
import { readZones } from "@/db/crud/zone";
76
import {
87
readLocationsForProject,
@@ -20,6 +19,7 @@ import {
2019
readNumberOfBoreholes,
2120
readSptNValueStats,
2221
} from "@/db/crud/stat";
22+
import dynamic from "next/dynamic";
2323

2424
// Props for Next.js dynamic route (project dashboard)
2525
type Props = {
@@ -88,6 +88,10 @@ export default async function Page({ params }: Props) {
8888
.filter((l) => l.locationIdentifier !== null)
8989
.map((l) => ({ ...l, locationIdentifier: l.locationIdentifier ?? "" }));
9090

91+
const ProjectMap = dynamic(() => import("./map").then((mod) => mod), {
92+
ssr: false,
93+
});
94+
9195
// Group project team members by role
9296
const owner = team.users.filter((u) => u.role === "OWNER");
9397
const contributors = team.users.filter((u) => u.role === "CONTRIBUTOR");
@@ -160,13 +164,13 @@ export default async function Page({ params }: Props) {
160164
/>
161165
</div>
162166
{/* Right Section: Team members by role */}
163-
<Card className="flex w-full flex-shrink-0 flex-col overflow-y-auto p-4 sm:w-64 md:w-80">
164-
<CardHeader className="p-0">
165-
<CardTitle className="text-md font-semibold">Team</CardTitle>
167+
<Card className="flex w-full flex-shrink-0 flex-col overflow-y-auto sm:w-64 md:w-80">
168+
<CardHeader>
169+
<CardTitle> Team</CardTitle>
166170
</CardHeader>
167-
<CardContent className="ml-2 p-0">
171+
<CardContent>
168172
<div>
169-
<h3 className="text-md mb-2 font-semibold">Owner</h3>
173+
<h3 className="mb-2 text-sm font-semibold">Owner</h3>
170174
<div className="flex flex-wrap gap-2">
171175
{owner.length > 0 ? (
172176
owner.map(({ user }) => (
@@ -184,7 +188,7 @@ export default async function Page({ params }: Props) {
184188
</div>
185189
</div>
186190
<div className="mt-6">
187-
<h3 className="text-md mb-2 font-semibold">Contributors</h3>
191+
<h3 className="mb-2 text-sm font-semibold">Contributors</h3>
188192
<div className="flex flex-wrap gap-2">
189193
{contributors.length > 0 ? (
190194
contributors.map(({ user }) => (
@@ -202,7 +206,7 @@ export default async function Page({ params }: Props) {
202206
</div>
203207
</div>
204208
<div className="mt-6">
205-
<h3 className="text-md mb-2 font-semibold">Viewers</h3>
209+
<h3 className="mb-2 text-sm font-semibold">Viewers</h3>
206210
<div className="flex flex-wrap gap-2">
207211
{viewers.length > 0 ? (
208212
viewers.map(({ user }) => (

packages/app/src/app/(app)/projects/[projectId]/imports/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,18 @@ export default async function Page({ params, searchParams }: Props) {
6464
</Button>
6565
</DropdownMenuTrigger>
6666
<DropdownMenuContent>
67-
<DropdownMenuItem>
67+
<DropdownMenuItem asChild>
6868
<Link
6969
href={`/projects/${projectId}/imports/ags/new`}
70-
className="flex items-center gap-2"
70+
className="flex cursor-pointer items-center gap-2"
7171
>
7272
<FileText className="h-4 w-4" /> AGS
7373
</Link>
7474
</DropdownMenuItem>
75-
<DropdownMenuItem>
75+
<DropdownMenuItem asChild>
7676
<Link
7777
href={`/projects/${projectId}/imports/csv/new`}
78-
className="flex items-center gap-2"
78+
className="flex w-full cursor-pointer items-center gap-2"
7979
>
8080
<FileSpreadsheet className="h-4 w-4" /> Excel/CSV
8181
</Link>

packages/app/src/components/common/sidebar/config.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,7 @@ const homeSidebar: SidebarConfig = {
6666
navMain: [
6767
{
6868
title: "Workspace",
69-
items: [
70-
{ title: "Home", url: "/", iconType: "home" },
71-
{ title: "Projects", url: "/projects", iconType: "list" },
72-
{ title: "Explore", url: "/explore", iconType: "search" },
73-
],
69+
items: [{ title: "Projects", url: "/projects", iconType: "list" }],
7470
},
7571
],
7672
};
@@ -114,11 +110,7 @@ const projectSidebar: SidebarConfig = {
114110
url: "/projects/:id/team",
115111
iconType: "users",
116112
},
117-
{
118-
title: "Activity",
119-
url: "/projects/:id/activity",
120-
iconType: "clipboard",
121-
},
113+
122114
{
123115
title: "Abbreviations",
124116
url: "/projects/:id/abbreviations",

0 commit comments

Comments
 (0)