Skip to content

Commit bf145c5

Browse files
committed
feat(arc): add shadcn map
1 parent 48831ae commit bf145c5

15 files changed

Lines changed: 1613 additions & 54 deletions

File tree

components.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@
1010
"cssVariables": true,
1111
"prefix": ""
1212
},
13+
"iconLibrary": "lucide",
1314
"aliases": {
1415
"components": "@/components",
1516
"utils": "@/lib/utils",
1617
"ui": "@/components/ui",
1718
"lib": "@/lib",
1819
"hooks": "@/hooks"
1920
},
20-
"iconLibrary": "lucide"
21+
"registries": {
22+
"@shadcn-map": "https://shadcn-map.vercel.app/r/{name}.json"
23+
}
2124
}

package-lock.json

Lines changed: 70 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"@radix-ui/react-label": "^2.1.8",
5353
"@radix-ui/react-popover": "^1.1.15",
5454
"@radix-ui/react-select": "^2.2.6",
55-
"@radix-ui/react-separator": "^1.1.7",
55+
"@radix-ui/react-separator": "^1.1.8",
5656
"@radix-ui/react-slot": "^1.2.4",
5757
"@radix-ui/react-switch": "^1.2.6",
5858
"@radix-ui/react-toggle": "^1.1.10",
@@ -78,6 +78,8 @@
7878
"date-fns": "^4.1.0",
7979
"jotai": "^2.15.0",
8080
"js-cookie": "^3.0.5",
81+
"leaflet": "^1.9.4",
82+
"leaflet-draw": "^1.0.4",
8183
"lowlight": "^3.3.0",
8284
"lucide-react": "^0.548.0",
8385
"next": "^16.1.6",
@@ -90,6 +92,7 @@
9092
"react-dom": "^19.2.3",
9193
"react-hook-form": "^7.65.0",
9294
"react-intersection-observer": "^9.16.0",
95+
"react-leaflet": "^5.0.0",
9396
"react-medium-image-zoom": "^5.4.0",
9497
"sanitize-html": "^2.17.1",
9598
"sonner": "^2.0.7",
@@ -110,6 +113,8 @@
110113
"@testing-library/react": "^16.3.0",
111114
"@testing-library/user-event": "^14.6.1",
112115
"@types/js-cookie": "^3.0.6",
116+
"@types/leaflet": "^1.9.21",
117+
"@types/leaflet-draw": "^1.0.13",
113118
"@types/node": "^22.19.3",
114119
"@types/react": "^19.2.7",
115120
"@types/react-dom": "^19",
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { AbstractResourceLayout } from "@/features/resources/server";
2+
import type { WrapperProps } from "@/types/components";
3+
4+
export default function MapLayout(props: WrapperProps) {
5+
return (
6+
<AbstractResourceLayout
7+
route="/interactive-map"
8+
header="Mapa obiektów"
9+
{...props}
10+
/>
11+
);
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { BackToHomeButton } from "@/components/presentation/back-to-home-button";
2+
import { AbstractResourceMap } from "@/features/abstract-resource-map";
3+
4+
export default function MapPage() {
5+
return (
6+
// TODO: deduplicate this container wrapper
7+
<div className="flex h-full flex-col justify-between gap-2">
8+
<AbstractResourceMap />
9+
<BackToHomeButton chevronsIcon className="self-start" />
10+
</div>
11+
);
12+
}

src/app/(private)/page.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { RefreshCcw } from "lucide-react";
1+
import { Map, RefreshCcw } from "lucide-react";
22

33
import { DashboardButton } from "@/components/presentation/dashboard-button";
44
import { getUserDisplayName } from "@/features/authentication";
@@ -39,6 +39,11 @@ export default async function Home() {
3939
<DashboardButton resource={Resource.Notifications} />
4040
<DashboardButton resource={Resource.AcademicSemesters} />
4141
<DashboardButton resource={Resource.MobileConfig} />
42+
<DashboardButton
43+
href="/interactive-map"
44+
icon={Map}
45+
label="Mapa obiektów"
46+
/>
4247
</div>
4348
</div>
4449
</div>

0 commit comments

Comments
 (0)