This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Script from 'next/script' | |
type Props = { | |
formUrl: string | |
} | |
export const ReformEmbed = ({ formUrl }: Props) => { | |
return ( | |
<> | |
<div id="my-reform" className="z-50 relative" /> | |
<Script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Locale, Path } from '../types' | |
const removeRegion = (locale: string): string => { | |
const [noRegion] = locale.split('-') | |
return noRegion | |
} | |
const validateLocale = (locale: string, defaultLocale: string): Locale => { | |
if (locale === Locale.sv || locale === Locale.en) { | |
return locale | |
} else { |