dumbass speedrun any%

master
Drake 1 year ago
parent 287a8ca82f
commit 4dc6e74659

@ -47,7 +47,7 @@ export default (props: PropsWithChildren<StoryProps>) => {
const currentURL = new URL(
"https://voltpad.ruthenic.com" + props.currentHref
);
const chapterNum = currentURL.searchParams.get("chapter") ?? 0;
const chapterNum = Number(currentURL.searchParams.get("chapter") ?? 0);
return (
<html lang="en">
@ -103,7 +103,7 @@ export default (props: PropsWithChildren<StoryProps>) => {
{isChapter ? (
<meta
property="og:title"
content={props.story.chapters[0].name}
content={props.story.chapters[chapterNum].name}
/>
) : (
<meta property="og:title" content={props.story.name} />
@ -113,7 +113,10 @@ export default (props: PropsWithChildren<StoryProps>) => {
props.story.chapters[0].partJSON.photoUrl ? (
<meta
property="og:image"
content={props.story.chapters[0].partJSON.photoUrl}
content={
props.story.chapters[chapterNum].partJSON
.photoUrl
}
/>
) : undefined
) : undefined}
@ -122,7 +125,7 @@ export default (props: PropsWithChildren<StoryProps>) => {
props.story.chapters[0].partJSON.videoId ? (
<meta
property="og:video"
content={`https://www.youtube.com/v/${props.story.chapters[0].partJSON.videoId}`}
content={`https://www.youtube.com/v/${props.story.chapters[chapterNum].partJSON.videoId}`}
/>
) : undefined
) : undefined}

Loading…
Cancel
Save