UPDATE: Have Stripe only load on pages it's needed;

FIX: Pass proper prop through `ContentContext`;
This commit is contained in:
Chris-1010
2025-02-23 23:28:14 +00:00
parent 52a15d8691
commit 38a74e0710
4 changed files with 80 additions and 57 deletions

View File

@@ -49,7 +49,7 @@ const CategoryPage: React.FC = () => {
setStreamOffset((prev) => prev + data.length);
const processedStreams = data.map((stream: any) => ({
const processedStreams: StreamData[] = data.map((stream: any) => ({
type: "stream",
id: stream.user_id,
title: stream.title,
@@ -80,9 +80,10 @@ const CategoryPage: React.FC = () => {
const logOnScroll = async () => {
if (hasMoreData && listRowRef.current) {
const newCategories = await fetchCategoryStreams();
if (newCategories?.length > 0) {
if (newCategories && newCategories.length > 0) {
listRowRef.current.addMoreItems(newCategories);
}
else console.log("No more data to fetch");
}
};