mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-21 20:36:37 +00: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:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user