Skip to content

Commit

Permalink
fix: fixing paraglide imports
Browse files Browse the repository at this point in the history
  • Loading branch information
dafuga committed Oct 3, 2024
1 parent 453b260 commit 7b7dc43
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/hooks.server.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { sequence } from '@sveltejs/kit/hooks';
import type { Handle, RequestEvent } from '@sveltejs/kit';

import { availableLanguageTags } from '$lib/paraglide/runtime';
import { availableLanguageTags } from './lib/paraglide/runtime';
import { i18n } from '$lib/i18n';
import { isNetworkShortName } from '$lib/wharf/chains';

Expand All @@ -14,7 +14,7 @@ export function getHeaderLang(event: RequestEvent) {
acceptLanguage?.split(',')?.map((lang: string) => lang.split(';')[0].split('-')[0].trim()) ??
[];
for (const locale of locales) {
if (availableLanguageTags.find((l) => l.toLowerCase() === locale)) {
if (availableLanguageTags.find((l: string) => l.toLowerCase() === locale)) {
return locale;
}
}
Expand All @@ -30,7 +30,7 @@ function skipRedirect(pathname: string) {
}

function isLanguage(value: string) {
return availableLanguageTags.find((l) => l.toLowerCase() === value);
return availableLanguageTags.find((l: string) => l.toLowerCase() === value);
}

function isNetwork(value: string) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createI18n } from '@inlang/paraglide-sveltekit';
import * as runtime from '$lib/paraglide/runtime.js';
import * as runtime from './paraglide/runtime.js';
import type { Asset } from '@wharfkit/antelope';

export const i18n = createI18n(runtime, {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as m from '$lib/paraglide/messages.js';
import Button from '$lib/components/button/button.svelte';
import { Box, Stack } from '$lib/components/layout';
import { languageTag } from '$lib/paraglide/runtime';
import { languageTag } from '../lib/paraglide/runtime';
import { chainShortNames } from '$lib/wharf/chains';
</script>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import type { PageData } from './$types';
import * as m from '$lib/paraglide/messages.js';
import * as m from '../../../../../lib/paraglide/messages.js';
export let data: PageData;
</script>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { PageLoad } from './$types';
import * as m from '$lib/paraglide/messages.js';
import * as m from '../../../../../../../lib/paraglide/messages.js';
import { error } from '@sveltejs/kit';

export const load: PageLoad = async ({ params, parent }) => {
Expand Down

0 comments on commit 7b7dc43

Please sign in to comment.