UPDATE: Add LoadingScreen component to maintain consistency

This commit is contained in:
Chris-1010
2025-02-24 16:24:52 +00:00
parent 5f13534c7a
commit db5996b157
11 changed files with 38 additions and 41 deletions

View File

@@ -8,6 +8,7 @@ import { useFollow } from "../hooks/useFollow";
import { useNavigate } from "react-router-dom";
import Button, { EditButton } from "../components/Input/Button";
import DynamicPageContent from "../components/Layout/DynamicPageContent";
import LoadingScreen from "../components/Layout/LoadingScreen";
interface UserProfileData {
id: number;
@@ -100,13 +101,8 @@ const UserPage: React.FC = () => {
if (loggedInUsername && username) checkFollowStatus(username);
}, [username]);
if (!profileData) {
return (
<div className="h-screen w-screen flex items-center justify-center text-white">
Loading...
</div>
);
}
if (!profileData) return <LoadingScreen />;
return (
<DynamicPageContent
className={`min-h-screen ${
@@ -226,7 +222,7 @@ const UserPage: React.FC = () => {
id={profileData.id}
type="stream"
title={profileData.currentStreamTitle || ""}
streamer=""
username=""
viewers={profileData.currentStreamViewers || 0}
thumbnail={profileData.currentStreamThumbnail}
onItemClick={() => {