import type { FunctionalComponent } from 'preact'; import { h } from 'preact'; import './LanguageSelect.css'; const SelectLanguage: FunctionalComponent<{}> = ({}) => { let defaultValue = undefined; if (!import.meta.env.SSR) { const oldPathname = window.location.pathname; const oldPathnameParts = oldPathname.split('/'); if (/[a-z]{2}/.test(oldPathnameParts[1])) { defaultValue = oldPathnameParts[1]; } } return (
); }; export default SelectLanguage;