Skip to content

Commit ef76b6f

Browse files
committed
wrapped not undefined anymore
1 parent 70e29a1 commit ef76b6f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

website/theme.config.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,11 @@ const config: DocsThemeConfig = {
219219
}
220220
const isWrapped = pathname.startsWith('/wrapped/');
221221
if (isWrapped) {
222+
const name = query?.name ?? 'My React app';
222223
ogUrl = `https://telemetry.million.dev/api/v1/og/wrapped/${
223224
query.id
224-
}.mp4?name=${encodeURIComponent(query?.name as any)}`;
225-
title = (query?.name ?? "My React app") + ' Wrapped | Million.js';
225+
}.mp4?name=${encodeURIComponent(name as any)}`;
226+
title = name + ' Wrapped | Million.js';
226227
}
227228

228229
return (
@@ -294,7 +295,9 @@ const config: DocsThemeConfig = {
294295
}
295296

296297
if (pathname.startsWith('/wrapped/')) {
297-
return { title: (query?.name ?? "My React app") + ' Wrapped | Million.js' };
298+
return {
299+
title: (query?.name ?? 'My React app') + ' Wrapped | Million.js',
300+
};
298301
}
299302

300303
return { titleTemplate: `%s | Million.js` };

0 commit comments

Comments
 (0)