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

View File

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