MAJOR Fix: Resolved API Request Delays;

Feat: Added a dev test account to users for expedited login;
Refactor: Improve socket connection handling and add logging for API request duration & update to ListRow key generation for improved uniqueness;
Feat: Made it so streams with no set thumbnail use their category's thumbnail;
Minor Fix: Corrections to db recommendation methods;
This commit is contained in:
Chris-1010
2025-01-30 03:42:22 +00:00
parent 6cfac0d78f
commit 6586506c97
19 changed files with 197 additions and 118 deletions

View File

@@ -23,24 +23,24 @@ interface StreamDataProps {
const VideoPage: React.FC<VideoPageProps> = ({ streamId }) => {
const { isLoggedIn } = useAuth();
const [showCheckout, setShowCheckout] = useState(false);
// const [showCheckout, setShowCheckout] = useState(false);
const showReturn = window.location.search.includes("session_id");
const { streamerName } = useParams<{ streamerName: string }>();
const [streamData, setStreamData] = useState<StreamDataProps>();
const navigate = useNavigate();
useEffect(() => {
// Prevent scrolling when checkout is open
if (showCheckout) {
document.body.style.overflow = "hidden";
} else {
document.body.style.overflow = "unset";
}
// Cleanup function to ensure overflow is restored when component unmounts
return () => {
document.body.style.overflow = "unset";
};
}, [showCheckout]);
// useEffect(() => {
// // Prevent scrolling when checkout is open
// if (showCheckout) {
// document.body.style.overflow = "hidden";
// } else {
// document.body.style.overflow = "unset";
// }
// // Cleanup function to ensure overflow is restored when component unmounts
// return () => {
// document.body.style.overflow = "unset";
// };
// }, [showCheckout]);
useEffect(() => {
// Fetch stream data for this streamer
fetch(
@@ -83,7 +83,7 @@ const VideoPage: React.FC<VideoPageProps> = ({ streamId }) => {
>
{isLoggedIn && (
<Button
onClick={() => setShowCheckout(true)}
// onClick={() => setShowCheckout(true)}
extraClasses="mx-auto mb-4"
>
Payment Screen Test
@@ -92,8 +92,8 @@ const VideoPage: React.FC<VideoPageProps> = ({ streamId }) => {
</div>
</div>
{showCheckout && <CheckoutForm onClose={() => setShowCheckout(false)} />}
{showReturn && <Return />}
{/* {showCheckout && <CheckoutForm onClose={() => setShowCheckout(false)} />} */}
{/* {showReturn && <Return />} */}
</div>
);
};