Skip to content

Commit

Permalink
move load to the top
Browse files Browse the repository at this point in the history
  • Loading branch information
fuxingloh committed Nov 15, 2023
1 parent 724011e commit c54f240
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion website/app/[caip2]/[asset]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export default async function Page(props: {
return notFound();
}

const highlighter = await loadHighlighter();
const image = frontmatter.fields.images?.find((image) => image.type === 'logo');

return (
Expand All @@ -73,7 +74,7 @@ export default async function Page(props: {

<ContentedProse html={frontmatter.html} />

<FrontmatterJson content={frontmatter} highlighter={await loadHighlighter()} />
<FrontmatterJson content={frontmatter} highlighter={highlighter} />
</div>
</main>
);
Expand Down
1 change: 0 additions & 1 deletion website/components/contented/ShikiHighlighter.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import './ShikiHighlighter.css';
import 'shiki/themes/css-variables.json';

import { ReactElement } from 'react';
import { getHighlighter as getShiki, Highlighter, renderToHtml } from 'shiki';
Expand Down

0 comments on commit c54f240

Please sign in to comment.