Skip to content

Commit

Permalink
Improve code, fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
WarningImHack3r committed Sep 30, 2024
1 parent ba1959f commit 36131ae
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,5 @@
"typescript-eslint": "^8.8.0",
"vite": "^5.4.8"
},
"type": "module",
"packageManager": "[email protected]+sha512.0a203ffaed5a3f63242cd064c8fb5892366c103e328079318f78062f24ea8c9d50bc6a47aa3567cabefd824d170e78fa2745ed1f16b132e16436146b7688f19b"
"type": "module"
}
3 changes: 2 additions & 1 deletion src/lib/elements/button/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { default } from "./Button.svelte";
import Button from "./Button.svelte";

export default Button;
export * from "./types";
5 changes: 2 additions & 3 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script lang="ts">
import "../app.css";
import type { LayoutData } from "./$types";
import { afterNavigate, beforeNavigate, goto } from "$app/navigation";
import { page } from "$app/stores";
import ArrowUp from "@inqling/svelte-icons/heroicon-24-solid/arrow-up.svelte";
Expand All @@ -22,7 +21,7 @@
}
// Meta tags
export let data: LayoutData;
export let data;
let metadata: MetaTagsProps;
$: metadata = extend(true, {}, data.baseMetaTags, {
title: $page.data.pageTitle,
Expand All @@ -33,7 +32,7 @@
}
});
let schemas: JsonLdProps["schema"] = [];
$: schemas = [...(data.baseSchemas ?? []), ...($page.data.pageSchemas ?? [])].filter(Boolean);
$: schemas = [...data.baseSchemas, ...($page.data.pageSchemas ?? [])];
// Inlang
onSetLanguageTag(() => {
Expand Down
6 changes: 5 additions & 1 deletion src/routes/+layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ import * as m from "$paraglide/messages";
export const prerender = true;

export const load: LayoutLoad = ({ route, url }) => {
if (!browser) return;
if (!browser) {
return {
baseSchemas: []
};
}

function conditionallyRedirectTo(
lang: (typeof availableLanguageTags)[number] = sourceLanguageTag
Expand Down
4 changes: 2 additions & 2 deletions src/routes/contact/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import type { PageData, Snapshot } from "./$types";
import type { Snapshot } from "./$types";
import Check from "@inqling/svelte-icons/heroicon-24-outline/check.svelte";
import PaperAirplane from "@inqling/svelte-icons/heroicon-24-outline/paper-airplane.svelte";
import Phone from "@inqling/svelte-icons/heroicon-24-outline/phone.svelte";
Expand All @@ -8,7 +8,7 @@
import Section from "$layouts/Section.svelte";
import Button from "$elements/button";
export let data: PageData;
export let data;
export const snapshot: Snapshot<typeof formValues> = {
capture: () => formValues,
Expand Down

0 comments on commit 36131ae

Please sign in to comment.