Add referrerURI to the base type and make it optional

This commit is contained in:
garronej 2023-04-20 03:37:11 +02:00
parent ff077943ec
commit bb85829d71
2 changed files with 2 additions and 2 deletions

View File

@ -26,6 +26,7 @@ export declare namespace KcContext {
resourceUrl: string;
resourcesCommonPath: string;
resourcesPath: string;
referrerURI?: string;
getLogoutUrl: () => string;
};
features: {
@ -71,7 +72,6 @@ export declare namespace KcContext {
export type Account = Common & {
pageId: "account.ftl";
url: {
referrerURI: string;
accountUrl: string;
};
realm: {

View File

@ -99,7 +99,7 @@ export default function Account(props: PageProps<Extract<KcContext, { pageId: "a
<div className="form-group">
<div id="kc-form-buttons" className="col-md-offset-2 col-md-10 submit">
<div>
{url.referrerURI !== undefined && <a href={url.referrerURI}>${msg("backToApplication")}</a>}
{url.referrerURI !== undefined && <a href={url.referrerURI}>{msg("backToApplication")}</a>}
<button
type="submit"
className={clsx(