diff --git a/apps/_components/src/CodeSnippet/CodeSnippet.tsx b/apps/_components/src/CodeSnippet/CodeSnippet.tsx index 9bb4ad2e6d..bf00ef571e 100644 --- a/apps/_components/src/CodeSnippet/CodeSnippet.tsx +++ b/apps/_components/src/CodeSnippet/CodeSnippet.tsx @@ -27,7 +27,7 @@ const plugins = [ ]; type CodeSnippetProps = { - language?: 'css' | 'html' | 'ts' | 'markdown' | 'json' | 'shell'; + language?: 'css' | 'html' | 'ts' | 'markdown' | 'json' | 'shell' | 'tsx'; children: string; } & React.HTMLAttributes; @@ -47,7 +47,8 @@ const CodeSnippet = ({ ) { try { const formatted = await format(children, { - parser: language === 'ts' ? 'babel-ts' : language, + parser: + language === 'ts' || language === 'tsx' ? 'babel-ts' : language, plugins, }); setSnippet(formatted); @@ -74,6 +75,7 @@ const CodeSnippet = ({
{snippet && ( diff --git a/apps/_components/src/logos/Udir.tsx b/apps/_components/src/logos/Udir.tsx index f2bc095722..33348d08d6 100644 --- a/apps/_components/src/logos/Udir.tsx +++ b/apps/_components/src/logos/Udir.tsx @@ -10,7 +10,7 @@ export function Udir(rest: UdirProps) { > Utdanningsdirektoratet logo -