Onboarding / Deployment Scripts / Marketing updates
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { error } from '@sveltejs/kit';
|
||||
import { locationsBySlug } from '$lib/content/locations';
|
||||
import { getSharedPageContent } from '$lib/server/content';
|
||||
import type { PageServerLoad } from './$types';
|
||||
|
||||
export const load: PageServerLoad = async ({ params }) => {
|
||||
const location = locationsBySlug[params.suburb];
|
||||
|
||||
if (!location) {
|
||||
throw error(404, 'Page not found');
|
||||
}
|
||||
|
||||
return {
|
||||
content: await getSharedPageContent(),
|
||||
location
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user