Skip to content

Commit

Permalink
Use universal load
Browse files Browse the repository at this point in the history
  • Loading branch information
harsh-mn-yral committed Feb 13, 2024
1 parent 1963074 commit cd2ad61
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit cd2ad61

Please sign in to comment.