From 3497ccfbb1158f35695d8e729882d5123f6acd68 Mon Sep 17 00:00:00 2001 From: garronej Date: Sun, 26 Feb 2023 17:17:50 +0100 Subject: [PATCH] Add comments --- src/keycloakTheme/pages/Login.tsx | 6 ++++++ src/keycloakTheme/pages/Terms.tsx | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/keycloakTheme/pages/Login.tsx b/src/keycloakTheme/pages/Login.tsx index a6266dd..21418b0 100644 --- a/src/keycloakTheme/pages/Login.tsx +++ b/src/keycloakTheme/pages/Login.tsx @@ -1,7 +1,13 @@ +// This is a copy paste from https://github.com/InseeFrLab/keycloakify/blob/main/src/lib/pages/Login.tsx import { useState, type FormEventHandler } from "react"; +// You can replace all relative imports by cherry picking files from the keycloakify module. +// For example, the following import: +// import { clsx } from "./tools/clsx"; +// becomes: import { clsx } from "keycloakify/lib/tools/clsx"; import { useConstCallback } from "keycloakify/lib/tools/useConstCallback"; import type { PageProps } from "keycloakify/lib/KcProps"; +// Here use your own KcContext and I18n that you might have overloaded. import type { KcContext } from "../kcContext"; import type { I18n } from "../i18n"; diff --git a/src/keycloakTheme/pages/Terms.tsx b/src/keycloakTheme/pages/Terms.tsx index 62e9fd9..c579d1a 100644 --- a/src/keycloakTheme/pages/Terms.tsx +++ b/src/keycloakTheme/pages/Terms.tsx @@ -5,7 +5,6 @@ * in the KcApp.tsx * Example: https://github.com/garronej/keycloakify-starter/blob/a20c21b2aae7c6dc6dbea294f3d321955ddf9355/src/KcApp/KcApp.tsx#L14-L30 */ - import { clsx } from "keycloakify/lib/tools/clsx"; import { useRerenderOnStateChange } from "evt/hooks"; import { Markdown } from "keycloakify/lib/tools/Markdown";