UPDATE: Updated chat message structure;

Bug: Session seems to be empty when chat.py routes are called.
This commit is contained in:
Chris-1010
2025-01-30 17:57:38 +00:00
parent 5d3479e726
commit 3c0d9d3131
10 changed files with 52 additions and 37 deletions

View File

@@ -3,7 +3,6 @@ import Navbar from "../components/Layout/Navbar";
import ListRow from "../components/Layout/ListRow";
import { useNavigate } from "react-router-dom";
import { useStreams } from "../context/StreamsContext";
import { useAuth } from "../context/AuthContext";
interface HomePageProps {
variant?: "default" | "personalised";
@@ -12,7 +11,6 @@ interface HomePageProps {
const HomePage: React.FC<HomePageProps> = ({ variant = "default" }) => {
const { featuredStreams, featuredCategories } = useStreams();
const navigate = useNavigate();
const { isLoggedIn } = useAuth();
const handleStreamClick = (streamId: number, streamerName: string) => {
console.log(`Navigating to ${streamId}`);
@@ -27,25 +25,15 @@ const HomePage: React.FC<HomePageProps> = ({ variant = "default" }) => {
>
<Navbar variant="home" />
{/* Not working - trying to display default streams */}
{/* If Personalised_HomePage, display Streams recommended for the logged-in user. Else, live streams with the most viewers. */}
<ListRow
type="stream"
title="Live Now"
description="Streamers that are currently live"
title={"Live Now" + (variant === "personalised" ? " - Recommended" : "")}
description={variant === "personalised" ? "We think you might like these streams - Streamers recommended for you" : "Streamers that are currently live"}
items={featuredStreams}
onClick={handleStreamClick}
/>
{isLoggedIn && variant === "personalised" && (
<ListRow
type="stream"
title="Live Now - Recommended"
description="We think you might like these streams - Streamers recommended for you"
items={featuredStreams}
onClick={handleStreamClick}
/>
)}
{/* If Personalised_HomePage, display Categories the logged-in user follows. Else, trending categories. */}
<ListRow
type="category"
title={variant === "personalised" ? "Followed Categories" : "Trending Categories"}