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:
vlalx 2025-06-03 21:10:00 +03:00 committed by GitHub
parent dc6fafba41
commit d768bb163a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 152 additions and 51 deletions

View file

@ -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) => {