UPDATE: Dynamically change profile picture on UserPage, without requiring page reload

This commit is contained in:
Chris-1010
2025-03-03 12:14:16 +00:00
parent 45b62a06fc
commit 3012e8ebd1
6 changed files with 112 additions and 116 deletions

View File

@@ -23,6 +23,7 @@ function App() {
const [userId, setUserId] = useState<number | null>(null);
const [isLive, setIsLive] = useState(false);
const [isLoading, setIsLoading] = useState(true);
const [profilePicture, setProfilePicture] = useState<string | null>(null);
useEffect(() => {
fetch("/api/user/login_status")
@@ -53,10 +54,12 @@ function App() {
username,
userId,
isLive,
profilePicture,
setIsLoggedIn,
setUsername,
setUserId,
setIsLive,
setProfilePicture,
}}
>
<SidebarProvider>