Skip to content

Commit e33baa0

Browse files
committed
feat(arc): add shadcn map
1 parent a8008ee commit e33baa0

15 files changed

Lines changed: 1710 additions & 15 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": "http://shadcn-map.vercel.app/r/{name}.json"
23+
}
2124
}

package-lock.json

Lines changed: 146 additions & 5 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
@@ -51,7 +51,7 @@
5151
"@radix-ui/react-label": "^2.1.7",
5252
"@radix-ui/react-popover": "^1.1.15",
5353
"@radix-ui/react-select": "^2.2.6",
54-
"@radix-ui/react-separator": "^1.1.7",
54+
"@radix-ui/react-separator": "^1.1.8",
5555
"@radix-ui/react-slot": "^1.2.4",
5656
"@radix-ui/react-switch": "^1.2.6",
5757
"@radix-ui/react-toggle": "^1.1.10",
@@ -77,6 +77,8 @@
7777
"date-fns": "^4.1.0",
7878
"jotai": "^2.15.0",
7979
"js-cookie": "^3.0.5",
80+
"leaflet": "^1.9.4",
81+
"leaflet-draw": "^1.0.4",
8082
"lowlight": "^3.3.0",
8183
"lucide-react": "^0.548.0",
8284
"next": "^16.0.0",
@@ -89,6 +91,7 @@
8991
"react-dom": "^19.2.0",
9092
"react-hook-form": "^7.65.0",
9193
"react-intersection-observer": "^9.16.0",
94+
"react-leaflet": "^5.0.0",
9295
"react-medium-image-zoom": "^5.4.0",
9396
"sonner": "^2.0.7",
9497
"tailwind-merge": "^3.3.1",
@@ -108,6 +111,8 @@
108111
"@testing-library/react": "^16.3.0",
109112
"@testing-library/user-event": "^14.6.1",
110113
"@types/js-cookie": "^3.0.6",
114+
"@types/leaflet": "^1.9.21",
115+
"@types/leaflet-draw": "^1.0.13",
111116
"@types/node": "^22",
112117
"@types/react": "^19.2.2",
113118
"@types/react-dom": "^19",

src/app/(private)/map/layout.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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 route="/map" header="Mapa obiektów" {...props} />
7+
);
8+
}

src/app/(private)/map/page.tsx

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-collection";
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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
Building,
55
Calendar,
66
CircleQuestionMark,
7+
Map,
78
Megaphone,
89
Notebook,
910
RefreshCcw,
@@ -53,6 +54,7 @@ export default async function Home() {
5354
label="Sekcja o nas"
5455
/>
5556
<DashboardButton resource={Resource.Notifications} icon={Bell} />
57+
<DashboardButton href="/map" icon={Map} label="Mapa obiektów" />
5658
</div>
5759
</div>
5860
</div>

0 commit comments

Comments
 (0)