Skip to content

Commit

Permalink
making postpage work
Browse files Browse the repository at this point in the history
  • Loading branch information
Gautham-kj committed Oct 19, 2023
1 parent 14c5553 commit a8b94ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/routes/post/[slug]/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export async function load({ params, locals }) {
) {
if (locals && locals.user) {
const res = await api.get_post(params.slug);
console.log(res);
if (res.error) {
// throwing error for user not found
throw error(400, 'Post Not Found');
Expand Down
4 changes: 4 additions & 0 deletions src/routes/post/[slug]/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<script lang="ts">
import Navbar from '$lib/components/Navbar.svelte';
import ExpandedPost from '$lib/components/ExpandedPost.svelte';
export let data;
</script>

<Navbar />
<!-- <ExpandedPost /> -->

0 comments on commit a8b94ff

Please sign in to comment.