added mail service

This commit is contained in:
2024-04-10 21:24:25 +03:00
parent c76d4b9717
commit 78107d4ec7
80 changed files with 3478 additions and 329 deletions

View File

@@ -0,0 +1,24 @@
'use client'
import { useChangeLocale, useCurrentLocale } from '@/locales/client'
import { LC, type loc } from '@/config/locales'
import { ChangeEvent } from 'react'
import styles from '@/styles/LocaleSwitcher.module.scss'
export default function LocaleSwitcher () {
const changeLocale = useChangeLocale()
const locale = useCurrentLocale()
const selectHandler = (e: ChangeEvent<HTMLSelectElement>) => changeLocale(
e.target.value as loc)
return (
//@ts-ignore
<select onChange={selectHandler} defaultValue={locale}
className={styles['yo-locale-switcher']}>
{LC.map(item => (
<option key={item.iso} value={item.code}>
{item.iso.toUpperCase()}
</option>
))}
</select>
)
}