first fixes

This commit is contained in:
Lokowitz
2025-05-17 18:17:22 +00:00
parent 731ec1da69
commit eff812eaa8
27 changed files with 80 additions and 114 deletions

View File

@@ -15,7 +15,7 @@ import {
import { GetApiKeyResponse } from "@server/routers/apiKeys";
import ApiKeyProvider from "@app/providers/ApiKeyProvider";
import { HorizontalTabs } from "@app/components/HorizontalTabs";
import { useTranslations } from "next-intl";
import { getTranslations } from 'next-intl/server';
interface SettingsLayoutProps {
children: React.ReactNode;
@@ -25,7 +25,7 @@ interface SettingsLayoutProps {
export default async function SettingsLayout(props: SettingsLayoutProps) {
const params = await props.params;
const t = useTranslations();
const t = await getTranslations();
const { children } = props;

View File

@@ -15,7 +15,7 @@ import {
BreadcrumbPage,
BreadcrumbSeparator
} from "@app/components/ui/breadcrumb";
import { useTranslations } from "next-intl";
import { getTranslations } from 'next-intl/server';
interface SettingsLayoutProps {
children: React.ReactNode;
@@ -37,7 +37,7 @@ export default async function SettingsLayout(props: SettingsLayoutProps) {
redirect("/admin/idp");
}
const t = useTranslations();
const t = await getTranslations();
const navItems: HorizontalTabs = [
{

View File

@@ -371,7 +371,7 @@ export default function Page() {
</AlertTitle>
<AlertDescription>
{/*TODO(vlalx): Validate replacing */}
{t('idpJmespathAboutDescription')}
{t('idpJmespathAboutDescription')}{" "}
<a
href="https://jmespath.org"
target="_blank"
@@ -447,8 +447,7 @@ export default function Page() {
render={({ field }) => (
<FormItem>
<FormLabel>
"idpOidcConfigureScopes": "Scopes"
{t('')}
{t('idpOidcConfigureScopes')}
</FormLabel>
<FormControl>
<Input {...field} />

View File

@@ -3,7 +3,7 @@ import { authCookieHeader } from "@app/lib/api/cookies";
import { AxiosResponse } from "axios";
import SettingsSectionTitle from "@app/components/SettingsSectionTitle";
import IdpTable, { IdpRow } from "./AdminIdpTable";
import { useTranslations } from "next-intl";
import { getTranslations } from 'next-intl/server';
export default async function IdpPage() {
let idps: IdpRow[] = [];
@@ -16,7 +16,8 @@ export default async function IdpPage() {
} catch (e) {
console.error(e);
}
const t = useTranslations();
const t = await getTranslations();
return (
<>

View File

@@ -7,7 +7,6 @@ import UsersTable, { GlobalUserRow } from "./AdminUsersTable";
import { Alert, AlertDescription, AlertTitle } from "@app/components/ui/alert";
import { InfoIcon } from "lucide-react";
import { getTranslations } from 'next-intl/server';
import { useTranslations } from "next-intl";
type PageProps = {
params: Promise<{ orgId: string }>;
@@ -26,7 +25,8 @@ export default async function UsersPage(props: PageProps) {
} catch (e) {
console.error(e);
}
const t = useTranslations();
const t = await getTranslations();
const userRows: GlobalUserRow[] = rows.map((row) => {
return {