diff --git a/app/(root)/profile/[profileId]/page.tsx b/app/(root)/profile/[profileId]/page.tsx
index d77f916..4dd0895 100644
--- a/app/(root)/profile/[profileId]/page.tsx
+++ b/app/(root)/profile/[profileId]/page.tsx
@@ -1,5 +1,6 @@
"use client";
+import { useEffect, useState } from "react";
import { useQuery } from "convex/react";
import EmptyState from "@/components/EmptyState";
@@ -8,22 +9,34 @@ import PodcastCard from "@/components/PodcastCard";
import ProfileCard from "@/components/ProfileCard";
import { api } from "@/convex/_generated/api";
import { ProfilePodcastProps } from "@/types";
-
const ProfilePage = ({
params,
}: {
params: {
profileId: string;
};
-}) => {
- const user = useQuery(api.users.getUserById, {
- clerkId: params.profileId,
- });
+ }) => {
+
+ const [isFetching, setIsFetching] = useState(true);
+ const user = useQuery(api.users.getUserById, { clerkId: params.profileId });
const podcastsData = useQuery(api.podcasts.getPodcastByAuthorId, {
authorId: params.profileId,
}) as ProfilePodcastProps;
- if (!user || !podcastsData) return