Skip to content

Commit

Permalink
Fix building
Browse files Browse the repository at this point in the history
  • Loading branch information
AnotherPillow committed May 15, 2024
1 parent 988c98c commit 258d0a0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/routes/+layout.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const prerender = true
16 changes: 10 additions & 6 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script lang="ts">
import type { ChangeEventHandler } from "svelte/elements";
import readFileContent from "$lib/readFileContent";
import { page } from '$app/stores';
import { get } from "svelte/store";
import { onMount } from "svelte";
let createMode = false
Expand All @@ -12,16 +12,20 @@
let saveFileUploadError: string = '';
let saveFileDownloadLink: string = '';
const params = new URLSearchParams(get(page).url.search);
let params = null as any
let beforeRe = params.get('before') ?? ''
let afterRe = params.get('after') ?? ''
let fixText = params.get('title') ?? ''
onMount(() => {
params = new URLSearchParams(window.location.search);
})
let beforeRe = params?.get('before') ?? ''
let afterRe = params?.get('after') ?? ''
let fixText = params?.get('title') ?? ''
if (!beforeRe || !afterRe || !fixText) createMode = true
if (params.has('creation')) createMode = true
if (params?.has('creation')) createMode = true
const handleUploadedFile: ChangeEventHandler<HTMLInputElement> = async (e) => {
const { files } = e.currentTarget
Expand Down

0 comments on commit 258d0a0

Please sign in to comment.