/** * NOTE: You do not need to do all this to put your own Terms and conditions * this is if you want component level customization. * If the default works for you, you can just use the useDownloadTerms hook * in the KcApp.tsx * Example: https://github.com/garronej/keycloakify-starter/blob/a20c21b2aae7c6dc6dbea294f3d321955ddf9355/src/KcApp/KcApp.tsx#L14-L30 */ import { clsx } from "keycloakify/tools/clsx"; import { useRerenderOnStateChange } from "evt/hooks"; import { Markdown } from "keycloakify/tools/Markdown"; import { type PageProps, defaultClasses } from "keycloakify/pages/PageProps"; import { useGetClassName } from "keycloakify/lib/useGetClassName"; import { evtTermMarkdown } from "keycloakify/lib/useDownloadTerms"; import type { KcContext } from "../kcContext"; import type { I18n } from "../i18n"; export default function Terms(props: PageProps, I18n>) { const { kcContext, i18n, doUseDefaultCss, Template, classes } = props; const { getClassName } = useGetClassName({ "defaultClasses": !doUseDefaultCss ? undefined : defaultClasses, classes }); const { msg, msgStr } = i18n; useRerenderOnStateChange(evtTermMarkdown); const { url } = kcContext; if (evtTermMarkdown.state === undefined) { return null; } return (