run npm run format
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
<section>
|
||||
Live board are not yet implemented on the server
|
||||
</section>
|
||||
<section>Live board are not yet implemented on the server</section>
|
||||
|
||||
<style>
|
||||
section {
|
||||
font-family: 'URW Gothic', sans-serif;
|
||||
text-align: center;
|
||||
font-size: 2rem;
|
||||
width: 90%;
|
||||
margin: auto;
|
||||
padding-top: 25px;
|
||||
max-width: 500px;
|
||||
}
|
||||
</style>
|
||||
section {
|
||||
font-family: 'URW Gothic', sans-serif;
|
||||
text-align: center;
|
||||
font-size: 2rem;
|
||||
width: 90%;
|
||||
margin: auto;
|
||||
padding-top: 25px;
|
||||
max-width: 500px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -3,35 +3,35 @@ import type { PageLoad } from './$types';
|
||||
import { error } from '@sveltejs/kit';
|
||||
|
||||
export const load: PageLoad = async ({ url }) => {
|
||||
const locId = url.searchParams.get('loc');
|
||||
const locId = url.searchParams.get('loc');
|
||||
|
||||
if (!LOCATIONS.loaded) {
|
||||
await LOCATIONS.init(fetch);
|
||||
}
|
||||
if (!LOCATIONS.loaded) {
|
||||
await LOCATIONS.init(fetch);
|
||||
}
|
||||
|
||||
let title: string = "";
|
||||
let title: string = '';
|
||||
|
||||
if (!locId) {
|
||||
error(400, {
|
||||
message: 'Location not provided',
|
||||
owlCode: 'NO_LOCATION_IN_PATH',
|
||||
});
|
||||
}
|
||||
if (!locId) {
|
||||
error(400, {
|
||||
message: 'Location not provided',
|
||||
owlCode: 'NO_LOCATION_IN_PATH'
|
||||
});
|
||||
}
|
||||
|
||||
if (locId) {
|
||||
const location = LOCATIONS.find(locId);
|
||||
if (locId) {
|
||||
const location = LOCATIONS.find(locId);
|
||||
|
||||
if (location) {
|
||||
title = location.n || location.t;
|
||||
} else {
|
||||
error(404, {
|
||||
message: `Location (${locId}) not found`,
|
||||
owlCode: 'INVALID_LOCATION_CODE',
|
||||
});
|
||||
}
|
||||
}
|
||||
if (location) {
|
||||
title = location.n || location.t;
|
||||
} else {
|
||||
error(404, {
|
||||
message: `Location (${locId}) not found`,
|
||||
owlCode: 'INVALID_LOCATION_CODE'
|
||||
});
|
||||
}
|
||||
}
|
||||
return {
|
||||
title,
|
||||
location,
|
||||
location
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user