From 34971c67dea6376231fbe20b779cf358d3411b05 Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Sun, 9 Jun 2024 15:00:18 +0200 Subject: [PATCH] fmt --- .storybook/main.ts | 2 +- README.md | 6 +++--- package.json | 2 +- src/account/KcContext.ts | 5 +---- src/account/KcPageStory.tsx | 5 +---- src/kc.gen.ts | 2 +- src/login/KcContext.ts | 5 +---- src/login/KcPage.tsx | 10 +++++++--- src/login/KcPageStory.tsx | 5 +---- 9 files changed, 17 insertions(+), 25 deletions(-) diff --git a/.storybook/main.ts b/.storybook/main.ts index a3cde84..c4e4afd 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -12,6 +12,6 @@ const config: StorybookConfig = { name: "@storybook/react-vite", options: {} }, - staticDirs: ["../public"], + staticDirs: ["../public"] }; export default config; diff --git a/README.md b/README.md index c74cf18..0bc02f2 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ yarn build-keycloak-theme # Storybook -Spin up a test environment for your Keycloak pages. +Spin up a test environment for your Keycloak pages. ```bash npx keycloakify add-story # Select the pages you want to add stories for @@ -28,7 +28,7 @@ yarn storybook # Start Storybook # Test in a real Keycloak environment Test your theme in a local Keycloak docker container. -You need to have Docker running. Install [Docker Desktop](https://www.docker.com/products/docker-desktop/) if you don't have it. +You need to have Docker running. Install [Docker Desktop](https://www.docker.com/products/docker-desktop/) if you don't have it. ```bash npx keycloakify start-keycloak @@ -85,7 +85,7 @@ You'll need to apply theses changes to the `src/main.tsx` file: ); - + declare global { interface Window { kcContext?: diff --git a/package.json b/package.json index e898603..85af48d 100755 --- a/package.json +++ b/package.json @@ -48,4 +48,4 @@ "resolutions": { "jackspeak": "2.1.1" } -} \ No newline at end of file +} diff --git a/src/account/KcContext.ts b/src/account/KcContext.ts index b25f30f..a043f25 100644 --- a/src/account/KcContext.ts +++ b/src/account/KcContext.ts @@ -9,7 +9,4 @@ export type KcContextExtension = { export type KcContextExtensionPerPage = {}; -export type KcContext = ExtendKcContext< - KcContextExtension, - KcContextExtensionPerPage ->; +export type KcContext = ExtendKcContext; diff --git a/src/account/KcPageStory.tsx b/src/account/KcPageStory.tsx index f4c1ff7..f9656b2 100644 --- a/src/account/KcPageStory.tsx +++ b/src/account/KcPageStory.tsx @@ -1,10 +1,7 @@ import type { DeepPartial } from "keycloakify/tools/DeepPartial"; import type { KcContext } from "./KcContext"; import { createGetKcContextMock } from "keycloakify/account/KcContext"; -import type { - KcContextExtension, - KcContextExtensionPerPage -} from "./KcContext"; +import type { KcContextExtension, KcContextExtensionPerPage } from "./KcContext"; import KcPage from "./KcPage"; import { themeNames, kcEnvDefaults } from "../kc.gen"; diff --git a/src/kc.gen.ts b/src/kc.gen.ts index 97b759e..e26062d 100644 --- a/src/kc.gen.ts +++ b/src/kc.gen.ts @@ -18,4 +18,4 @@ export const KcEnvNames: KcEnvName[] = []; export const kcEnvDefaults: Record = {}; -/* prettier-ignore-end */ \ No newline at end of file +/* prettier-ignore-end */ diff --git a/src/login/KcContext.ts b/src/login/KcContext.ts index b452df6..a130466 100644 --- a/src/login/KcContext.ts +++ b/src/login/KcContext.ts @@ -9,7 +9,4 @@ export type KcContextExtension = { export type KcContextExtensionPerPage = {}; -export type KcContext = ExtendKcContext< - KcContextExtension, - KcContextExtensionPerPage ->; +export type KcContext = ExtendKcContext; diff --git a/src/login/KcPage.tsx b/src/login/KcPage.tsx index 346ce42..6f09fca 100644 --- a/src/login/KcPage.tsx +++ b/src/login/KcPage.tsx @@ -5,7 +5,9 @@ import { useDownloadTerms } from "keycloakify/login"; import { useI18n } from "./i18n"; import DefaultPage from "keycloakify/login/DefaultPage"; import Template from "keycloakify/login/Template"; -const UserProfileFormFields = lazy(() => import("keycloakify/login/UserProfileFormFields")); +const UserProfileFormFields = lazy( + () => import("keycloakify/login/UserProfileFormFields") +); const doMakeUserConfirmPassword = true; @@ -31,7 +33,9 @@ export default function KcApp(props: { kcContext: KcContext }) { break; } - const termsMarkdown = await fetch(`${import.meta.env.BASE_URL}terms/${termsFileName}`).then(r => r.text()); + const termsMarkdown = await fetch( + `${import.meta.env.BASE_URL}terms/${termsFileName}` + ).then(r => r.text()); return { termsMarkdown, termsLanguageTag }; } @@ -61,4 +65,4 @@ export default function KcApp(props: { kcContext: KcContext }) { ); } -const classes = {} satisfies { [key in ClassKey]?: string }; \ No newline at end of file +const classes = {} satisfies { [key in ClassKey]?: string }; diff --git a/src/login/KcPageStory.tsx b/src/login/KcPageStory.tsx index 12c27fa..2a69b6a 100644 --- a/src/login/KcPageStory.tsx +++ b/src/login/KcPageStory.tsx @@ -2,10 +2,7 @@ import type { DeepPartial } from "keycloakify/tools/DeepPartial"; import type { KcContext } from "./KcContext"; import KcPage from "./KcPage"; import { createGetKcContextMock } from "keycloakify/login/KcContext"; -import type { - KcContextExtension, - KcContextExtensionPerPage -} from "./KcContext"; +import type { KcContextExtension, KcContextExtensionPerPage } from "./KcContext"; import { themeNames, kcEnvDefaults } from "../kc.gen"; const kcContextExtension: KcContextExtension = {