Skip to content

Commit

Permalink
fix initialize account theme
Browse files Browse the repository at this point in the history
  • Loading branch information
luca-peruzzo committed Nov 28, 2024
1 parent 2f9d1a7 commit f98d12a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 1 addition & 5 deletions src/bin/initialize-account-theme/boilerplate/KcPage.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import UserProfileFormFields from '@keycloakify/svelte/account/components/UserProfileFormFields.svelte';
import Template from '@keycloakify/svelte/account/Template.svelte';
import type { KcContext } from 'keycloakify/account/KcContext';
import type { ClassKey } from 'keycloakify/account/lib/kcClsx';
Expand All @@ -16,17 +15,14 @@
};
const classes = {} satisfies { [key in ClassKey]?: string };
const doMakeUserConfirmPassword = true;
</script>

{#await page() then { default: Page }}
<Page
{kcContext}
i18n={$i18n}
{i18n}
{classes}
{Template}
{UserProfileFormFields}
doUseDefaultCss={true}
{doMakeUserConfirmPassword}
></Page>
{/await}
6 changes: 3 additions & 3 deletions src/bin/initialize-account-theme/boilerplate/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { i18nBuilder } from '@keycloakify/svelte/account';
import { ThemeName } from '../kc.gen';
import type { ThemeName } from '../kc.gen';

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { getI18n, ofTypeI18n } = i18nBuilder
const { useI18n, ofTypeI18n } = i18nBuilder
.withThemeName<ThemeName>()
.withExtraLanguages({}) // See: https://docs.keycloakify.dev/i18n/adding-support-for-extra-languages
.withCustomTranslations({}) // See: https://docs.keycloakify.dev/i18n/adding-new-translation-messages-or-changing-the-default-ones
.build();
type I18n = typeof ofTypeI18n;
export { getI18n, type I18n };
export { useI18n, type I18n };

0 comments on commit f98d12a

Please sign in to comment.