Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9ac1c78

Browse files
committed
add pathGenerator prop to Basemap
1 parent 5786307 commit 9ac1c78

File tree

2 files changed

+28
-29
lines changed

2 files changed

+28
-29
lines changed

app/components/Basemap.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ import { geoPath } from "d3";
22

33
export const Basemap = ({
44
geoJSONFeatures,
5-
projection,
5+
pathGenerator,
66
height = 975,
77
width = 610,
88
pathProps,
99
}) => {
10-
const pathGenerator = geoPath(projection);
1110
const fill = props.fill || "none";
1211
const stroke = props.stroke || "white";
1312

app/layout.jsx

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,34 @@ import { Footer, Header } from "@/app/components";
55
const inter = Inter({ subsets: ["latin"] });
66

77
export const metadata = {
8-
title: "Savage Maps",
9-
description: "Interactive maps powered by D3.js",
10-
openGraph: {
11-
title: "Savage Maps",
12-
siteName: "Savage Maps",
13-
description: "Interactive maps powered by D3.js",
14-
locale: "en_US",
15-
type: "website",
16-
url: "https://savagemaps.com",
17-
images: [
18-
{
19-
url: "/public/savage-maps-preview.png",
20-
width: 1600,
21-
height: 900,
22-
alt: "Savage Maps social preview image",
23-
},
24-
],
25-
},
8+
title: "Savage Maps",
9+
description: "Interactive maps powered by D3.js",
10+
openGraph: {
11+
title: "Savage Maps",
12+
siteName: "Savage Maps",
13+
description: "Interactive maps powered by D3.js",
14+
locale: "en_US",
15+
type: "website",
16+
url: "https://savagemaps.com",
17+
images: [
18+
{
19+
url: "/public/savage-maps-preview.png",
20+
width: 1600,
21+
height: 900,
22+
alt: "Savage Maps social preview image",
23+
},
24+
],
25+
},
2626
};
2727

2828
export default function RootLayout({ children }) {
29-
return (
30-
<html lang='en' data-theme='acid'>
31-
<body className={`${inter.className} flex min-h-screen flex-col`}>
32-
<Header />
33-
{children}
34-
<Footer />
35-
</body>
36-
</html>
37-
);
29+
return (
30+
<html lang="en" data-theme="acid">
31+
<body className={`${inter.className} flex min-h-screen flex-col`}>
32+
<Header />
33+
{children}
34+
<Footer />
35+
</body>
36+
</html>
37+
);
3838
}

0 commit comments

Comments
 (0)