add client/admin pages, show info and created admin api and server actions

This commit is contained in:
2024-04-28 19:32:31 +03:00
parent db66161d81
commit d6b259d71c
33 changed files with 458 additions and 91 deletions

View File

@@ -7,15 +7,18 @@ import { ChangeEvent } from 'react'
export default function LocaleSwitcher () {
const changeLocale = useChangeLocale()
const locale = useCurrentLocale()
const selectHandler = (e: ChangeEvent<HTMLSelectElement>) => changeLocale(e.target.value as loc)
const selectHandler = (e: ChangeEvent<HTMLSelectElement>) =>
changeLocale(e.target.value as loc)
// {cn(styles['yo-locale-switcher'], 'pr-4')}
return (//@ts-ignore
<select className="appearance-none bg-transparent block text-center text-xs text-sky-600 py-1 px-2 my-2 mx-0 outline-0"
aria-label="Switch locale"
defaultValue={locale} onChange={selectHandler}
<form><select
className="appearance-none bg-transparent block text-center text-xs text-sky-600 py-1 px-2 my-2 mx-0 outline-0"
aria-label="Switch locale"
defaultValue={locale} onChange={selectHandler}
>
{LC.map(item => (<option key={item.iso} value={item.code} className="pr-4">
{item.iso.toUpperCase()}
</option>))}
</select>)
</select></form>)
}