unpublished fix
This commit is contained in:
parent
e8f064fe3b
commit
9257889989
2 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts">
|
||||
import UserLink from "$lib/components/UserLink.svelte";
|
||||
import type { PageData } from "./$types";
|
||||
import { userData, auth } from "$lib/firebase";
|
||||
import { userData, auth, user } from "$lib/firebase";
|
||||
import {
|
||||
signInWithPopup,
|
||||
GoogleAuthProvider,
|
||||
|
@ -72,7 +72,7 @@
|
|||
</ul>
|
||||
<br />
|
||||
</div>
|
||||
{#if $userData?.username == $userData?.username}
|
||||
{#if $userData?.username == data.username}
|
||||
<div class=" top-0 right-0 absolute">
|
||||
<a href="/{$userData?.username}/edit">
|
||||
<button class="btn btn-ghost text-xs btn-xs mx-3 my-3"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { collection, getDocs, limit, query, where } from 'firebase/firestore';
|
||||
import type { PageLoad } from './$types';
|
||||
import { db } from '$lib/firebase';
|
||||
import { db, userData } from '$lib/firebase';
|
||||
import { error } from '@sveltejs/kit';
|
||||
|
||||
export const load = (async ({ params }) => {
|
||||
|
@ -20,7 +20,7 @@ export const load = (async ({ params }) => {
|
|||
throw error(404, "that user does not exists")
|
||||
}
|
||||
|
||||
if (!data.published && data.username != data.username) {
|
||||
if (!data.published) {
|
||||
throw error(403, `The Profile of @${data.username} is not public!`)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue