-
);
};
-export default DynamicPageContent;
\ No newline at end of file
+export default DynamicPageContent;
diff --git a/frontend/src/components/Layout/ListItem.tsx b/frontend/src/components/Layout/ListItem.tsx
index f56e6e4..6e0f569 100644
--- a/frontend/src/components/Layout/ListItem.tsx
+++ b/frontend/src/components/Layout/ListItem.tsx
@@ -65,7 +65,9 @@ const ListItem: React.FC
= ({
)}
-
{title}
+
+ {title}
+
{type === "stream" &&
{username}
}
{type === "stream" && (
{streamCategory}
diff --git a/frontend/src/components/Layout/ListRow.tsx b/frontend/src/components/Layout/ListRow.tsx
index d1aa663..8c66010 100644
--- a/frontend/src/components/Layout/ListRow.tsx
+++ b/frontend/src/components/Layout/ListRow.tsx
@@ -1,11 +1,16 @@
-import React, { forwardRef, useImperativeHandle, useRef, useState } from "react";
import {
ArrowLeft as ArrowLeftIcon,
ArrowRight as ArrowRightIcon,
} from "lucide-react";
+import React, {
+ forwardRef,
+ useImperativeHandle,
+ useRef,
+ useState,
+} from "react";
+import { useNavigate } from "react-router-dom";
import "../../assets/styles/listRow.css";
import ListItem, { ListItemProps } from "./ListItem";
-import { useNavigate } from "react-router-dom";
interface ListRowProps {
variant?: "default" | "search";
@@ -14,7 +19,7 @@ interface ListRowProps {
description?: string;
items: ListItemProps[];
wrap?: boolean;
- onClick: (itemName: string) => void;
+ onItemClick: (itemName: string) => void;
titleClickable?: boolean;
extraClasses?: string;
itemExtraClasses?: string;
@@ -22,8 +27,27 @@ interface ListRowProps {
children?: React.ReactNode;
}
-const ListRow = forwardRef<{ addMoreItems: (newItems: ListItemProps[]) => void }, ListRowProps>(
- ({ variant, type, title = "", description = "", items, wrap, onClick, titleClickable, extraClasses = "", itemExtraClasses = "", amountForScroll, children }, ref) => {
+const ListRow = forwardRef<
+ { addMoreItems: (newItems: ListItemProps[]) => void },
+ ListRowProps
+>(
+ (
+ {
+ variant = "default",
+ type,
+ title = "",
+ description = "",
+ items,
+ onItemClick,
+ titleClickable = false,
+ wrap = false,
+ extraClasses = "",
+ itemExtraClasses = "",
+ amountForScroll = 4,
+ children,
+ },
+ ref
+ ) => {
const [currentItems, setCurrentItems] = useState(items);
const slider = useRef
(null);
const scrollAmount = window.innerWidth * 0.3;
@@ -79,7 +103,9 @@ const ListRow = forwardRef<{ addMoreItems: (newItems: ListItemProps[]) => void }
>
handleTitleClick(type) : undefined}
>
@@ -90,7 +116,7 @@ const ListRow = forwardRef<{ addMoreItems: (newItems: ListItemProps[]) => void }
{/* List Items */}
- {!wrap && currentItems.length > (amountForScroll || 0) && (
+ {!wrap && currentItems.length > amountForScroll && (
<>
void }
onItemClick={() =>
(item.type === "stream" || item.type === "user") &&
item.username
- ? onClick?.(item.username)
- : onClick?.(item.title)
+ ? onItemClick?.(item.username)
+ : onItemClick?.(item.title)
}
- extraClasses={`${itemExtraClasses} min-w-[20vw] max-w-[20vw]`}
+ extraClasses={`${itemExtraClasses} w-[20vw]`}
/>
))}
@@ -140,4 +166,4 @@ const ListRow = forwardRef<{ addMoreItems: (newItems: ListItemProps[]) => void }
}
);
-export default ListRow;
\ No newline at end of file
+export default ListRow;
diff --git a/frontend/src/components/Navigation/Navbar.tsx b/frontend/src/components/Navigation/Navbar.tsx
index f298f77..a605fba 100644
--- a/frontend/src/components/Navigation/Navbar.tsx
+++ b/frontend/src/components/Navigation/Navbar.tsx
@@ -145,12 +145,12 @@ const Navbar: React.FC = ({ variant = "default" }) => {
{/* Stream Button */}
- {isLoggedIn && !window.location.pathname.includes('go-live') && (
+ {isLoggedIn && !window.location.pathname.includes("go-live") && (