fix: reader not defined at page load
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<section>
|
||||
{#each data.projects as p}
|
||||
<article>
|
||||
<h1><a href={`/projects/${p.ID}`}>{p.Name}</a></h1>
|
||||
<h1><a data-sveltekit-reload href={`/projects/${p.ID}`}>{p.Name}</a></h1>
|
||||
<p class="id">{p.ID}</p>
|
||||
</article>
|
||||
{/each}
|
||||
|
||||
@@ -5,6 +5,9 @@ import { db, s3, type Project } from '$lib';
|
||||
import { AWS_S3_DEFAULT_BUCKET } from '$env/static/private';
|
||||
import { extname } from 'node:path';
|
||||
|
||||
export const prerender = false;
|
||||
export const ssr = false;
|
||||
|
||||
export const load = (async ({ params }) => {
|
||||
const res = await db.get<{ id: string; name: string }>(
|
||||
'SELECT ID, Name FROM projects WHERE ID = ?',
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
background: rgbToHex(color),
|
||||
current: rgbToHex(currentColor),
|
||||
next: rgbToHex(nextColor),
|
||||
percentage: colorPerc
|
||||
percentage: Math.round(colorPerc)
|
||||
},
|
||||
scroll: {
|
||||
current: scroll,
|
||||
@@ -108,6 +108,7 @@
|
||||
</dialog>
|
||||
<section class="project">
|
||||
<aside>
|
||||
<a data-sveltekit-reload href="/" style="font-size: 0.5rem;">Return home</a>
|
||||
<section>
|
||||
<h1>{data.project.title}</h1>
|
||||
<p class="id">{data.project.id}</p>
|
||||
|
||||
Reference in New Issue
Block a user