mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-28 21:58:15 +02:00
I18n additionals (#125)
* New translation keys * Updates in src/components * Updates in src/providers * remove lable in selector, not needed --------- Co-authored-by: Lokowitz <marvinlokowitz@gmail.com>
This commit is contained in:
parent
dc6fafba41
commit
d768bb163a
16 changed files with 152 additions and 51 deletions
|
@ -3,6 +3,7 @@
|
|||
import OrgUserContext from "@app/contexts/orgUserContext";
|
||||
import { GetOrgUserResponse } from "@server/routers/user";
|
||||
import { useState } from "react";
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
interface OrgUserProviderProps {
|
||||
children: React.ReactNode;
|
||||
|
@ -15,9 +16,11 @@ export function OrgUserProvider({
|
|||
}: OrgUserProviderProps) {
|
||||
const [orgUser, setOrgUser] = useState<GetOrgUserResponse>(serverOrgUser);
|
||||
|
||||
const t = useTranslations();
|
||||
|
||||
const updateOrgUser = (updateOrgUser: Partial<GetOrgUserResponse>) => {
|
||||
if (!orgUser) {
|
||||
throw new Error("No org to update");
|
||||
throw new Error(t('orgErrorNoUpdate'));
|
||||
}
|
||||
|
||||
setOrgUser((prev) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue