Skip to content

Commit 0641378

Browse files
authored
Merge pull request #51 from smutyala1at/main
fix(metadata): add correct params type
2 parents d397ca5 + 8c5d794 commit 0641378

File tree

6 files changed

+19
-17
lines changed

6 files changed

+19
-17
lines changed

apps/docs/app/(docs)/[...slug]/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export async function generateMetadata({
5757

5858
const image = ['/docs-og', ...slug, 'image.png'].join('/');
5959
return {
60+
metadataBase: new URL("https://meshjs.dev"),
6061
title: page.data.title,
6162
description: page.data.description,
6263
openGraph: {

apps/docs/app/docs-og/[...slug]/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { notFound } from 'next/navigation';
44

55
export async function GET(
66
_req: Request,
7-
{ params }: RouteContext<'/docs-og/[...slug]'>,
7+
{ params }: { params: Promise<{ slug: string[] }> }
88
) {
99
const { slug } = await params;
1010
const page = source.getPage(slug.slice(0, -1));

apps/docs/components/ui/NavLinks.tsx

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,16 @@ import clsx from 'clsx';
1313
import * as heroIcons from '@heroicons/react/24/solid';
1414
import { iconResolver } from "@/lib/iconResolver";
1515

16-
const colors = [
17-
"blue", "purple", "pink", "green", "teal", "yellow", "red", "lime"
18-
]
16+
const colorClasses = [
17+
"text-blue-500",
18+
"text-purple-500",
19+
"text-pink-500",
20+
"text-green-500",
21+
"text-teal-500",
22+
"text-yellow-500",
23+
"text-red-500",
24+
"text-lime-500",
25+
];
1926

2027
export const navbarLinks: LinkItemType[] = [
2128
{
@@ -32,7 +39,7 @@ export const navbarLinks: LinkItemType[] = [
3239
<item.icon className={
3340
clsx(
3441
"mr-3 h-5 w-5",
35-
index < 8 && `text-${colors[index]}-500`
42+
colorClasses[index % colorClasses.length]
3643
)
3744
}
3845
/>
@@ -68,7 +75,7 @@ export const navbarLinks: LinkItemType[] = [
6875
<item.icon className={
6976
clsx(
7077
"mr-3 h-5 w-5",
71-
index < 8 && `text-${colors[8-(index+1)]}-500`
78+
colorClasses[8-(index+1) % colorClasses.length]
7279
)
7380
}
7481
/>
@@ -99,7 +106,7 @@ export const navbarLinks: LinkItemType[] = [
99106
<item.icon className={
100107
clsx(
101108
"mr-3 h-5 w-5",
102-
index < 8 && `text-${colors[(index * 3 % colors.length)]}-500`
109+
colorClasses[(index * 3 % colorClasses.length)]
103110
)
104111
}
105112
/>
@@ -130,7 +137,7 @@ export const navbarLinks: LinkItemType[] = [
130137
<item.icon className={
131138
clsx(
132139
"mr-3 h-5 w-5",
133-
index < 8 && (["About Us", "Support Us"].includes(item.title) ? "text-red-500" : `text-${colors[(index * 5 % colors.length)]}-500`)
140+
(["About Us", "Support Us"].includes(item.title) ? "text-red-500" : colorClasses[index % colorClasses.length])
134141
)
135142
}
136143
/>

apps/docs/data/links-data.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import {
66
WrenchIcon,
77
} from "@heroicons/react/24/solid";
88

9-
import { MenuItem } from "~/types/menu-item";
10-
119
export const metaOverview = {
1210
title: "Data Overview",
1311
desc: "Learn about the basics, and how Mesh handles Cardano data",
@@ -46,7 +44,7 @@ export const metaDataUtils = {
4644
icon: WrenchIcon,
4745
};
4846

49-
export const linksData: MenuItem[] = [
47+
export const linksData = [
5048
metaOverview,
5149
metaDataMesh,
5250
metaDataJson,

apps/docs/data/links-react.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import {
55
RocketLaunchIcon,
66
} from "@heroicons/react/24/solid";
77

8-
import { MenuItem } from "~/types/menu-item";
9-
108
export const metaReactGettingstarted = {
119
title: "Getting Started with React",
1210
desc: "Frontend components for wallet connections, and useful React hooks to getting wallet states",
@@ -26,7 +24,7 @@ export const metaReactWallethooks = {
2624
icon: BoltIcon,
2725
};
2826

29-
export const linksReact: MenuItem[] = [
27+
export const linksReact = [
3028
metaReactGettingstarted,
3129
metaReactUicomponents,
3230
metaReactWallethooks,

apps/docs/data/links-svelte.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import {
44
RocketLaunchIcon,
55
} from "@heroicons/react/24/solid";
66

7-
import { MenuItem } from "~/types/menu-item";
8-
97
export const metaSvelteGettingstarted = {
108
title: "Getting Started with Svelte",
119
desc: "Svelte frontend components for wallet connections.",
@@ -19,7 +17,7 @@ export const metaSvelteUicomponents = {
1917
icon: PaintBrushIcon,
2018
};
2119

22-
export const linksSvelte: MenuItem[] = [
20+
export const linksSvelte = [
2321
metaSvelteGettingstarted,
2422
metaSvelteUicomponents,
2523
];

0 commit comments

Comments
 (0)