From a20ddcc3512655b6fadc62b0b49a8647eef91648 Mon Sep 17 00:00:00 2001 From: Ole Wieners Date: Wed, 6 Sep 2023 15:32:15 +0200 Subject: [PATCH] Add return label to studio link --- frontend/src/layout/header/UserBox.tsx | 5 ++++- frontend/src/relay/auth.tsx | 3 ++- frontend/src/routes/manage/index.tsx | 5 ++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/frontend/src/layout/header/UserBox.tsx b/frontend/src/layout/header/UserBox.tsx index 5e4ff678b..f1f1187ba 100644 --- a/frontend/src/layout/header/UserBox.tsx +++ b/frontend/src/layout/header/UserBox.tsx @@ -202,7 +202,10 @@ const LoggedIn: React.FC = ({ user }) => { icon: , wrapper: , keepOpenAfterClick: true, diff --git a/frontend/src/relay/auth.tsx b/frontend/src/relay/auth.tsx index 12e90bf03..cd410a1ce 100644 --- a/frontend/src/relay/auth.tsx +++ b/frontend/src/relay/auth.tsx @@ -24,6 +24,7 @@ export type ExternalLinkProps = PropsWithChildren<{ service: "STUDIO"; params: { "return.target": URL; + "return.label": string; }; } | { service: "EDITOR"; @@ -49,7 +50,7 @@ export const ExternalLink: React.FC = ({ }) => { const target = serviceUrl(service); for (const [key, value] of Object.entries(params)) { - target.searchParams.append(key, value); + target.searchParams.append(key, value as string); } if (!CONFIG.auth.preAuthExternalLinks) { diff --git a/frontend/src/routes/manage/index.tsx b/frontend/src/routes/manage/index.tsx index bc8dedde1..9da4774be 100644 --- a/frontend/src/routes/manage/index.tsx +++ b/frontend/src/routes/manage/index.tsx @@ -116,7 +116,10 @@ const Manage: React.FC = () => { } {user.canUseStudio &&