From 5c5d7a43ef08c75b8245824026ca355bfdf0649b Mon Sep 17 00:00:00 2001 From: Stavros Date: Tue, 9 Jun 2026 16:17:57 +0300 Subject: [PATCH] chore: own review comments --- frontend/src/lib/hooks/screen-params.ts | 2 +- frontend/src/lib/i18n/locales/en-US.json | 2 +- frontend/src/lib/i18n/locales/en.json | 2 +- frontend/src/pages/authorize-page.tsx | 4 +--- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/frontend/src/lib/hooks/screen-params.ts b/frontend/src/lib/hooks/screen-params.ts index af6430c8..921fa4b6 100644 --- a/frontend/src/lib/hooks/screen-params.ts +++ b/frontend/src/lib/hooks/screen-params.ts @@ -28,7 +28,7 @@ export function useScreenParams(params: URLSearchParams): ScreenParams { export function recompileScreenParams(params: ScreenParams): string { const p = new URLSearchParams( Object.fromEntries( - Object.entries(params).filter(([, v]) => v != null), + Object.entries(params).filter(([, v]) => v !== undefined), ) as Record, ).toString(); diff --git a/frontend/src/lib/i18n/locales/en-US.json b/frontend/src/lib/i18n/locales/en-US.json index d4b2fd9f..dbe05c1a 100644 --- a/frontend/src/lib/i18n/locales/en-US.json +++ b/frontend/src/lib/i18n/locales/en-US.json @@ -71,7 +71,7 @@ "authorizeSuccessTitle": "Authorized", "authorizeSuccessSubtitle": "You will be redirected to the app in a few seconds.", "authorizeErrorClientInfo": "An error occurred while loading the client information. Please try again later.", - "authorizeErrorMissingParams": "The following parameters are missing: {{missingParams}}", + "authorizeErrorInvalidParams": "The request is missing required parameters or has invalid parameters. Please check the URL and try again.", "openidScopeName": "OpenID Connect", "openidScopeDescription": "Allows the app to access your OpenID Connect information.", "emailScopeName": "Email", diff --git a/frontend/src/lib/i18n/locales/en.json b/frontend/src/lib/i18n/locales/en.json index d4b2fd9f..dbe05c1a 100644 --- a/frontend/src/lib/i18n/locales/en.json +++ b/frontend/src/lib/i18n/locales/en.json @@ -71,7 +71,7 @@ "authorizeSuccessTitle": "Authorized", "authorizeSuccessSubtitle": "You will be redirected to the app in a few seconds.", "authorizeErrorClientInfo": "An error occurred while loading the client information. Please try again later.", - "authorizeErrorMissingParams": "The following parameters are missing: {{missingParams}}", + "authorizeErrorInvalidParams": "The request is missing required parameters or has invalid parameters. Please check the URL and try again.", "openidScopeName": "OpenID Connect", "openidScopeDescription": "Allows the app to access your OpenID Connect information.", "emailScopeName": "Email", diff --git a/frontend/src/pages/authorize-page.tsx b/frontend/src/pages/authorize-page.tsx index 1b7992c0..3251c774 100644 --- a/frontend/src/pages/authorize-page.tsx +++ b/frontend/src/pages/authorize-page.tsx @@ -135,9 +135,7 @@ export const AuthorizePage = () => {
- {screenParams.oidc_name !== undefined - ? screenParams.oidc_name.slice(0, 1) - : "U"} + {screenParams.oidc_name ? screenParams.oidc_name.slice(0, 1) : "U"}
{t("authorizeCardTitle", {