From cd2ad61ad5675304a1b923d489407dcdb89cd6be Mon Sep 17 00:00:00 2001 From: harshbaz Date: Tue, 13 Feb 2024 11:32:38 +0530 Subject: [PATCH] Use universal load --- .../(feed)/feed/[id=videoId]/{+page.server.ts => +page.ts} | 4 ++-- .../hotornot/[id=videoId]/{+page.server.ts => +page.ts} | 4 ++-- .../src/routes/profile/[id]/{+page.server.ts => +page.ts} | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) rename packages/web-client/src/routes/(feed)/feed/[id=videoId]/{+page.server.ts => +page.ts} (90%) rename packages/web-client/src/routes/(feed)/hotornot/[id=videoId]/{+page.server.ts => +page.ts} (90%) rename packages/web-client/src/routes/profile/[id]/{+page.server.ts => +page.ts} (94%) diff --git a/packages/web-client/src/routes/(feed)/feed/[id=videoId]/+page.server.ts b/packages/web-client/src/routes/(feed)/feed/[id=videoId]/+page.ts similarity index 90% rename from packages/web-client/src/routes/(feed)/feed/[id=videoId]/+page.server.ts rename to packages/web-client/src/routes/(feed)/feed/[id=videoId]/+page.ts index 744524ebc..5311d130f 100644 --- a/packages/web-client/src/routes/(feed)/feed/[id=videoId]/+page.server.ts +++ b/packages/web-client/src/routes/(feed)/feed/[id=videoId]/+page.ts @@ -2,12 +2,12 @@ export const ssr = false export const prerender = false import { Principal } from '@dfinity/principal' -import type { PageServerLoad } from './$types' +import type { PageLoad } from './$types' import type { PostPopulated } from '$lib/helpers/feed' import { individualUser } from '$lib/helpers/backend' import getDefaultImageUrl from '$lib/utils/getDefaultImageUrl' -export const load: PageServerLoad = async ({ params, fetch }) => { +export const load: PageLoad = async ({ params, fetch }) => { try { const id = params.id.split('@') const postId = BigInt(Number(id[1])) diff --git a/packages/web-client/src/routes/(feed)/hotornot/[id=videoId]/+page.server.ts b/packages/web-client/src/routes/(feed)/hotornot/[id=videoId]/+page.ts similarity index 90% rename from packages/web-client/src/routes/(feed)/hotornot/[id=videoId]/+page.server.ts rename to packages/web-client/src/routes/(feed)/hotornot/[id=videoId]/+page.ts index 5bcab2ae9..8573c27a7 100644 --- a/packages/web-client/src/routes/(feed)/hotornot/[id=videoId]/+page.server.ts +++ b/packages/web-client/src/routes/(feed)/hotornot/[id=videoId]/+page.ts @@ -2,12 +2,12 @@ export const ssr = true export const prerender = false import { Principal } from '@dfinity/principal' -import type { PageServerLoad } from './$types' +import type { PageLoad } from './$types' import type { PostPopulated } from '$lib/helpers/feed' import { individualUser } from '$lib/helpers/backend' import getDefaultImageUrl from '$lib/utils/getDefaultImageUrl' -export const load: PageServerLoad = async ({ params }) => { +export const load: PageLoad = async ({ params }) => { try { const id = params.id.split('@') const postId = BigInt(Number(id[1])) diff --git a/packages/web-client/src/routes/profile/[id]/+page.server.ts b/packages/web-client/src/routes/profile/[id]/+page.ts similarity index 94% rename from packages/web-client/src/routes/profile/[id]/+page.server.ts rename to packages/web-client/src/routes/profile/[id]/+page.ts index 0758c98cd..a12560584 100644 --- a/packages/web-client/src/routes/profile/[id]/+page.server.ts +++ b/packages/web-client/src/routes/profile/[id]/+page.ts @@ -15,9 +15,9 @@ import { userProfile } from '$lib/stores/app' import { Principal } from '@dfinity/principal' import { error, redirect } from '@sveltejs/kit' import { get } from 'svelte/store' -import type { PageServerLoad } from './$types' +import type { PageLoad } from './$types' -export const load: PageServerLoad = async ({ params, fetch }) => { +export const load: PageLoad = async ({ params, fetch }) => { const id = params.id if (!id) {