Skip to content

Commit

Permalink
Rename which props to ogImageFilename in <Shell />
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinyaigeek committed Jul 7, 2024
1 parent 722eb5c commit 6d96b44
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const generateIndexPage: GenerateHandler<Context> = async ({
return renderToStaticMarkup(
<Shell
language={rawLanguage}
which="TODO"
ogImageFilename="TODO"
title="shinyaigeek.dev"
path="/"
description={description}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const generateBlogPostPage: GenerateHandler<Context> = async ({
return renderToStaticMarkup(
<Shell
language={rawLanguage}
which="TODO"
ogImageFilename="TODO"
title="shinyaigeek.dev"
path={blogPost.metadata.path}
description={blogPost.metadata.description}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ interface SiteHeadProps {
title: string;
path: string;
language: "en" | "ja";
which: string;
ogImageFilename: string;
description: string;
}

const SiteHead: FunctionComponent<SiteHeadProps> = ({
title,
path,
language,
which,
ogImageFilename,
description,
}) => {
const locale = language === "en" ? "en_US" : "ja_JP";
Expand Down Expand Up @@ -48,15 +48,15 @@ const SiteHead: FunctionComponent<SiteHeadProps> = ({
language === "en"
? "https://en.shinyaigeek.dev"
: "https://ja.shinyaigeek.dev"
}/assets/ogimage/${language}/${which}.png`}
}/assets/ogimage/${language}/${ogImageFilename}.png`}
/>
<meta
name="twitter:image"
content={`${
language === "en"
? "https://en.shinyaigeek.dev"
: "https://ja.shinyaigeek.dev"
}/assets/ogimage/${language}/${which}.png`}
}/assets/ogimage/${language}/${ogImageFilename}.png`}
/>

<link
Expand Down Expand Up @@ -122,14 +122,14 @@ export const Shell: FunctionComponent<ShellProps> = ({
title,
path,
language,
which,
ogImageFilename,
description,
}) => (
<html lang={language}>
<SiteHead
title={title}
path={path}
which={which}
ogImageFilename={ogImageFilename}
language={language}
description={description}
/>
Expand Down

0 comments on commit 6d96b44

Please sign in to comment.