|
|
@ -25,6 +25,7 @@ import { |
|
|
|
FiltersSubContainer, |
|
|
|
FiltersSubContainer, |
|
|
|
ProductManagerRow, |
|
|
|
ProductManagerRow, |
|
|
|
FiltersRadioButton, |
|
|
|
FiltersRadioButton, |
|
|
|
|
|
|
|
StatsCol, |
|
|
|
} from "./VideoList-styles"; |
|
|
|
} from "./VideoList-styles"; |
|
|
|
import { SubtitleContainer } from "./Home-styles"; |
|
|
|
import { SubtitleContainer } from "./Home-styles"; |
|
|
|
|
|
|
|
|
|
|
@ -34,7 +35,10 @@ import { |
|
|
|
changefilterName, |
|
|
|
changefilterName, |
|
|
|
changefilterSearch, |
|
|
|
changefilterSearch, |
|
|
|
} from "../../state/features/videoSlice"; |
|
|
|
} from "../../state/features/videoSlice"; |
|
|
|
import { changeFilterType } from "../../state/features/persistSlice.ts"; |
|
|
|
import { |
|
|
|
|
|
|
|
changeFilterType, |
|
|
|
|
|
|
|
resetSubscriptions, |
|
|
|
|
|
|
|
} from "../../state/features/persistSlice.ts"; |
|
|
|
import { categories, subCategories } from "../../constants/Categories.ts"; |
|
|
|
import { categories, subCategories } from "../../constants/Categories.ts"; |
|
|
|
import { ListSuperLikeContainer } from "../../components/common/ListSuperLikes/ListSuperLikeContainer.tsx"; |
|
|
|
import { ListSuperLikeContainer } from "../../components/common/ListSuperLikes/ListSuperLikeContainer.tsx"; |
|
|
|
import { TabContext, TabList, TabPanel } from "@mui/lab"; |
|
|
|
import { TabContext, TabList, TabPanel } from "@mui/lab"; |
|
|
@ -53,7 +57,7 @@ export const Home = ({ mode }: HomeProps) => { |
|
|
|
const filterValue = useSelector( |
|
|
|
const filterValue = useSelector( |
|
|
|
(state: RootState) => state.video.filterValue |
|
|
|
(state: RootState) => state.video.filterValue |
|
|
|
); |
|
|
|
); |
|
|
|
const persistSelector = useSelector((state: RootState) => state.persist); |
|
|
|
const persistReducer = useSelector((state: RootState) => state.persist); |
|
|
|
const filterType = useSelector( |
|
|
|
const filterType = useSelector( |
|
|
|
(state: RootState) => state.persist.filterType |
|
|
|
(state: RootState) => state.persist.filterType |
|
|
|
); |
|
|
|
); |
|
|
@ -74,12 +78,12 @@ export const Home = ({ mode }: HomeProps) => { |
|
|
|
(state: RootState) => state.global.videosPerNamePublished |
|
|
|
(state: RootState) => state.global.videosPerNamePublished |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const { videos: globalVideos } = useSelector( |
|
|
|
const { videos: globalVideos, filteredSubscriptionList } = useSelector( |
|
|
|
(state: RootState) => state.video |
|
|
|
(state: RootState) => state.video |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const [isLoading, setIsLoading] = useState<boolean>(false); |
|
|
|
const [isLoading, setIsLoading] = useState<boolean>(false); |
|
|
|
const [tabValue, setTabValue] = useState<string>(persistSelector.selectedTab); |
|
|
|
const [tabValue, setTabValue] = useState<string>(persistReducer.selectedTab); |
|
|
|
|
|
|
|
|
|
|
|
const tabFontSize = "20px"; |
|
|
|
const tabFontSize = "20px"; |
|
|
|
|
|
|
|
|
|
|
@ -120,8 +124,13 @@ export const Home = ({ mode }: HomeProps) => { |
|
|
|
const afterFetch = useRef(false); |
|
|
|
const afterFetch = useRef(false); |
|
|
|
const isFetching = useRef(false); |
|
|
|
const isFetching = useRef(false); |
|
|
|
|
|
|
|
|
|
|
|
const { getVideos, getNewVideos, checkNewVideos, getVideosFiltered, getVideosCount } = |
|
|
|
const { |
|
|
|
useFetchVideos(); |
|
|
|
getVideos, |
|
|
|
|
|
|
|
getNewVideos, |
|
|
|
|
|
|
|
checkNewVideos, |
|
|
|
|
|
|
|
getVideosFiltered, |
|
|
|
|
|
|
|
getVideosCount, |
|
|
|
|
|
|
|
} = useFetchVideos(); |
|
|
|
|
|
|
|
|
|
|
|
const getVideosHandler = React.useCallback( |
|
|
|
const getVideosHandler = React.useCallback( |
|
|
|
async (reset?: boolean, resetFilters?: boolean) => { |
|
|
|
async (reset?: boolean, resetFilters?: boolean) => { |
|
|
@ -170,7 +179,19 @@ export const Home = ({ mode }: HomeProps) => { |
|
|
|
firstFetch.current = true; |
|
|
|
firstFetch.current = true; |
|
|
|
setIsLoading(true); |
|
|
|
setIsLoading(true); |
|
|
|
|
|
|
|
|
|
|
|
await getVideos({ type: filterType }, null, null, 20, tabValue); |
|
|
|
await getVideos( |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: "", |
|
|
|
|
|
|
|
category: "", |
|
|
|
|
|
|
|
subcategory: "", |
|
|
|
|
|
|
|
keywords: "", |
|
|
|
|
|
|
|
type: filterType, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
null, |
|
|
|
|
|
|
|
null, |
|
|
|
|
|
|
|
20, |
|
|
|
|
|
|
|
tabValue |
|
|
|
|
|
|
|
); |
|
|
|
afterFetch.current = true; |
|
|
|
afterFetch.current = true; |
|
|
|
isFetching.current = false; |
|
|
|
isFetching.current = false; |
|
|
|
|
|
|
|
|
|
|
@ -227,7 +248,6 @@ export const Home = ({ mode }: HomeProps) => { |
|
|
|
}, [getVideosHandlerMount, globalVideos]); |
|
|
|
}, [getVideosHandlerMount, globalVideos]); |
|
|
|
|
|
|
|
|
|
|
|
const filtersToDefault = async () => { |
|
|
|
const filtersToDefault = async () => { |
|
|
|
setFilterType("videos"); |
|
|
|
|
|
|
|
setFilterSearch(""); |
|
|
|
setFilterSearch(""); |
|
|
|
setFilterName(""); |
|
|
|
setFilterName(""); |
|
|
|
setSelectedCategoryVideos(null); |
|
|
|
setSelectedCategoryVideos(null); |
|
|
@ -273,293 +293,302 @@ export const Home = ({ mode }: HomeProps) => { |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<> |
|
|
|
<> |
|
|
|
<Box sx={{ width: "100%" }}> |
|
|
|
<Grid container sx={{ width: "100%" }}> |
|
|
|
<Grid container spacing={2} justifyContent="space-around"> |
|
|
|
<FiltersCol item xs={12} md={2} lg={2} xl={2} sm={3}> |
|
|
|
<Grid item xs={12} sm={4}> |
|
|
|
<FiltersContainer> |
|
|
|
Total Videos Published: {totalVideosPublished} |
|
|
|
<StatsCol |
|
|
|
</Grid> |
|
|
|
sx={{ display: persistReducer.showStats ? "block" : "none" }} |
|
|
|
<Grid item xs={12} sm={4}> |
|
|
|
> |
|
|
|
Total Names Publishing: {totalNamesPublished} |
|
|
|
<div> |
|
|
|
</Grid> |
|
|
|
# of Videos:{" "} |
|
|
|
<Grid item xs={12} sm={4}> |
|
|
|
<span style={{ fontWeight: "bold" }}> |
|
|
|
Average Videos per Name: {videosPerNamePublished} |
|
|
|
{totalVideosPublished} |
|
|
|
</Grid> |
|
|
|
</span> |
|
|
|
</Grid> |
|
|
|
</div> |
|
|
|
</Box> |
|
|
|
<div> |
|
|
|
<Grid container sx={{ width: "100%" }}> |
|
|
|
Names Publishing:{" "} |
|
|
|
<FiltersCol item xs={12} md={2} lg={2} xl={2} sm={3}> |
|
|
|
<span style={{ fontWeight: "bold" }}> |
|
|
|
<FiltersContainer> |
|
|
|
{totalNamesPublished} |
|
|
|
<Input |
|
|
|
</span> |
|
|
|
id="standard-adornment-name" |
|
|
|
</div> |
|
|
|
onChange={e => { |
|
|
|
<div> |
|
|
|
setFilterSearch(e.target.value); |
|
|
|
Videos per Name:{" "} |
|
|
|
}} |
|
|
|
<span style={{ fontWeight: "bold" }}> |
|
|
|
value={filterSearch} |
|
|
|
{videosPerNamePublished} |
|
|
|
placeholder="Search" |
|
|
|
</span> |
|
|
|
onKeyDown={handleInputKeyDown} |
|
|
|
</div> |
|
|
|
sx={{ |
|
|
|
</StatsCol> |
|
|
|
borderBottom: "1px solid white", |
|
|
|
<Input |
|
|
|
"&&:before": { |
|
|
|
id="standard-adornment-name" |
|
|
|
borderBottom: "none", |
|
|
|
onChange={e => { |
|
|
|
}, |
|
|
|
setFilterSearch(e.target.value); |
|
|
|
"&&:after": { |
|
|
|
}} |
|
|
|
borderBottom: "none", |
|
|
|
value={filterSearch} |
|
|
|
}, |
|
|
|
placeholder="Search" |
|
|
|
"&&:hover:before": { |
|
|
|
onKeyDown={handleInputKeyDown} |
|
|
|
borderBottom: "none", |
|
|
|
sx={{ |
|
|
|
}, |
|
|
|
borderBottom: "1px solid white", |
|
|
|
"&&.Mui-focused:before": { |
|
|
|
"&&:before": { |
|
|
|
borderBottom: "none", |
|
|
|
borderBottom: "none", |
|
|
|
}, |
|
|
|
}, |
|
|
|
"&&.Mui-focused": { |
|
|
|
"&&:after": { |
|
|
|
outline: "none", |
|
|
|
borderBottom: "none", |
|
|
|
}, |
|
|
|
}, |
|
|
|
fontSize: "18px", |
|
|
|
"&&:hover:before": { |
|
|
|
}} |
|
|
|
borderBottom: "none", |
|
|
|
/> |
|
|
|
}, |
|
|
|
<Input |
|
|
|
"&&.Mui-focused:before": { |
|
|
|
id="standard-adornment-name" |
|
|
|
borderBottom: "none", |
|
|
|
onChange={e => { |
|
|
|
}, |
|
|
|
setFilterName(e.target.value); |
|
|
|
"&&.Mui-focused": { |
|
|
|
}} |
|
|
|
outline: "none", |
|
|
|
value={filterName} |
|
|
|
}, |
|
|
|
placeholder="User's Name (Exact)" |
|
|
|
fontSize: "18px", |
|
|
|
onKeyDown={handleInputKeyDown} |
|
|
|
}} |
|
|
|
sx={{ |
|
|
|
/> |
|
|
|
marginTop: "20px", |
|
|
|
<Input |
|
|
|
borderBottom: "1px solid white", |
|
|
|
id="standard-adornment-name" |
|
|
|
"&&:before": { |
|
|
|
onChange={e => { |
|
|
|
borderBottom: "none", |
|
|
|
setFilterName(e.target.value); |
|
|
|
}, |
|
|
|
}} |
|
|
|
"&&:after": { |
|
|
|
value={filterName} |
|
|
|
borderBottom: "none", |
|
|
|
placeholder="User's Name (Exact)" |
|
|
|
}, |
|
|
|
onKeyDown={handleInputKeyDown} |
|
|
|
"&&:hover:before": { |
|
|
|
sx={{ |
|
|
|
borderBottom: "none", |
|
|
|
marginTop: "20px", |
|
|
|
}, |
|
|
|
borderBottom: "1px solid white", |
|
|
|
"&&.Mui-focused:before": { |
|
|
|
"&&:before": { |
|
|
|
borderBottom: "none", |
|
|
|
borderBottom: "none", |
|
|
|
}, |
|
|
|
}, |
|
|
|
"&&.Mui-focused": { |
|
|
|
"&&:after": { |
|
|
|
outline: "none", |
|
|
|
borderBottom: "none", |
|
|
|
}, |
|
|
|
}, |
|
|
|
fontSize: "18px", |
|
|
|
"&&:hover:before": { |
|
|
|
}} |
|
|
|
borderBottom: "none", |
|
|
|
/> |
|
|
|
}, |
|
|
|
|
|
|
|
"&&.Mui-focused:before": { |
|
|
|
<FiltersSubContainer> |
|
|
|
borderBottom: "none", |
|
|
|
<FormControl sx={{ width: "100%", marginTop: "30px" }}> |
|
|
|
}, |
|
|
|
<Box |
|
|
|
"&&.Mui-focused": { |
|
|
|
sx={{ |
|
|
|
outline: "none", |
|
|
|
display: "flex", |
|
|
|
}, |
|
|
|
gap: "20px", |
|
|
|
fontSize: "18px", |
|
|
|
alignItems: "center", |
|
|
|
}} |
|
|
|
flexDirection: "column", |
|
|
|
/> |
|
|
|
}} |
|
|
|
|
|
|
|
> |
|
|
|
<FiltersSubContainer> |
|
|
|
<FormControl fullWidth sx={{ marginBottom: 1 }}> |
|
|
|
<FormControl sx={{ width: "100%", marginTop: "30px" }}> |
|
|
|
<InputLabel |
|
|
|
<Box |
|
|
|
sx={{ |
|
|
|
sx={{ |
|
|
|
fontSize: "16px", |
|
|
|
display: "flex", |
|
|
|
}} |
|
|
|
gap: "20px", |
|
|
|
id="Category" |
|
|
|
alignItems: "center", |
|
|
|
> |
|
|
|
flexDirection: "column", |
|
|
|
Category |
|
|
|
}} |
|
|
|
</InputLabel> |
|
|
|
> |
|
|
|
<Select |
|
|
|
<FormControl fullWidth sx={{ marginBottom: 1 }}> |
|
|
|
labelId="Category" |
|
|
|
<InputLabel |
|
|
|
input={<OutlinedInput label="Category" />} |
|
|
|
sx={{ |
|
|
|
value={selectedCategoryVideos?.id || ""} |
|
|
|
fontSize: "16px", |
|
|
|
onChange={handleOptionCategoryChangeVideos} |
|
|
|
}} |
|
|
|
sx={{ |
|
|
|
id="Category" |
|
|
|
// Target the input field
|
|
|
|
> |
|
|
|
".MuiSelect-select": { |
|
|
|
Category |
|
|
|
fontSize: "16px", // Change font size for the selected value
|
|
|
|
</InputLabel> |
|
|
|
padding: "10px 5px 15px 15px;", |
|
|
|
<Select |
|
|
|
}, |
|
|
|
labelId="Category" |
|
|
|
// Target the dropdown icon
|
|
|
|
input={<OutlinedInput label="Category" />} |
|
|
|
".MuiSelect-icon": { |
|
|
|
value={selectedCategoryVideos?.id || ""} |
|
|
|
fontSize: "20px", // Adjust if needed
|
|
|
|
onChange={handleOptionCategoryChangeVideos} |
|
|
|
}, |
|
|
|
sx={{ |
|
|
|
// Target the dropdown menu
|
|
|
|
// Target the input field
|
|
|
|
"& .MuiMenu-paper": { |
|
|
|
".MuiSelect-select": { |
|
|
|
".MuiMenuItem-root": { |
|
|
|
fontSize: "16px", // Change font size for the selected value
|
|
|
|
fontSize: "14px", // Change font size for the menu items
|
|
|
|
padding: "10px 5px 15px 15px;", |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
// Target the dropdown icon
|
|
|
|
}} |
|
|
|
".MuiSelect-icon": { |
|
|
|
> |
|
|
|
fontSize: "20px", // Adjust if needed
|
|
|
|
{categories.map(option => ( |
|
|
|
}, |
|
|
|
<MenuItem key={option.id} value={option.id}> |
|
|
|
// Target the dropdown menu
|
|
|
|
{option.name} |
|
|
|
"& .MuiMenu-paper": { |
|
|
|
</MenuItem> |
|
|
|
".MuiMenuItem-root": { |
|
|
|
))} |
|
|
|
fontSize: "14px", // Change font size for the menu items
|
|
|
|
</Select> |
|
|
|
|
|
|
|
</FormControl> |
|
|
|
|
|
|
|
{selectedCategoryVideos && |
|
|
|
|
|
|
|
subCategories[selectedCategoryVideos?.id] && ( |
|
|
|
|
|
|
|
<FormControl fullWidth sx={{ marginBottom: 2 }}> |
|
|
|
|
|
|
|
<InputLabel |
|
|
|
|
|
|
|
sx={{ |
|
|
|
|
|
|
|
fontSize: "16px", |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
id="Sub-Category" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
Sub-Category |
|
|
|
|
|
|
|
</InputLabel> |
|
|
|
|
|
|
|
<Select |
|
|
|
|
|
|
|
labelId="Sub-Category" |
|
|
|
|
|
|
|
input={<OutlinedInput label="Sub-Category" />} |
|
|
|
|
|
|
|
value={selectedSubCategoryVideos?.id || ""} |
|
|
|
|
|
|
|
onChange={e => |
|
|
|
|
|
|
|
handleOptionSubCategoryChangeVideos( |
|
|
|
|
|
|
|
e, |
|
|
|
|
|
|
|
subCategories[selectedCategoryVideos?.id] |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
sx={{ |
|
|
|
|
|
|
|
// Target the input field
|
|
|
|
|
|
|
|
".MuiSelect-select": { |
|
|
|
|
|
|
|
fontSize: "16px", // Change font size for the selected value
|
|
|
|
|
|
|
|
padding: "10px 5px 15px 15px;", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// Target the dropdown icon
|
|
|
|
|
|
|
|
".MuiSelect-icon": { |
|
|
|
|
|
|
|
fontSize: "20px", // Adjust if needed
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
// Target the dropdown menu
|
|
|
|
}, |
|
|
|
"& .MuiMenu-paper": { |
|
|
|
}} |
|
|
|
".MuiMenuItem-root": { |
|
|
|
> |
|
|
|
fontSize: "14px", // Change font size for the menu items
|
|
|
|
{categories.map(option => ( |
|
|
|
|
|
|
|
<MenuItem key={option.id} value={option.id}> |
|
|
|
|
|
|
|
{option.name} |
|
|
|
|
|
|
|
</MenuItem> |
|
|
|
|
|
|
|
))} |
|
|
|
|
|
|
|
</Select> |
|
|
|
|
|
|
|
</FormControl> |
|
|
|
|
|
|
|
{selectedCategoryVideos && |
|
|
|
|
|
|
|
subCategories[selectedCategoryVideos?.id] && ( |
|
|
|
|
|
|
|
<FormControl fullWidth sx={{ marginBottom: 2 }}> |
|
|
|
|
|
|
|
<InputLabel |
|
|
|
|
|
|
|
sx={{ |
|
|
|
|
|
|
|
fontSize: "16px", |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
id="Sub-Category" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
Sub-Category |
|
|
|
|
|
|
|
</InputLabel> |
|
|
|
|
|
|
|
<Select |
|
|
|
|
|
|
|
labelId="Sub-Category" |
|
|
|
|
|
|
|
input={<OutlinedInput label="Sub-Category" />} |
|
|
|
|
|
|
|
value={selectedSubCategoryVideos?.id || ""} |
|
|
|
|
|
|
|
onChange={e => |
|
|
|
|
|
|
|
handleOptionSubCategoryChangeVideos( |
|
|
|
|
|
|
|
e, |
|
|
|
|
|
|
|
subCategories[selectedCategoryVideos?.id] |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
sx={{ |
|
|
|
|
|
|
|
// Target the input field
|
|
|
|
|
|
|
|
".MuiSelect-select": { |
|
|
|
|
|
|
|
fontSize: "16px", // Change font size for the selected value
|
|
|
|
|
|
|
|
padding: "10px 5px 15px 15px;", |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
// Target the dropdown icon
|
|
|
|
}} |
|
|
|
".MuiSelect-icon": { |
|
|
|
> |
|
|
|
fontSize: "20px", // Adjust if needed
|
|
|
|
{subCategories[selectedCategoryVideos.id].map( |
|
|
|
}, |
|
|
|
option => ( |
|
|
|
// Target the dropdown menu
|
|
|
|
<MenuItem key={option.id} value={option.id}> |
|
|
|
"& .MuiMenu-paper": { |
|
|
|
{option.name} |
|
|
|
".MuiMenuItem-root": { |
|
|
|
</MenuItem> |
|
|
|
fontSize: "14px", // Change font size for the menu items
|
|
|
|
) |
|
|
|
}, |
|
|
|
)} |
|
|
|
}, |
|
|
|
</Select> |
|
|
|
}} |
|
|
|
</FormControl> |
|
|
|
> |
|
|
|
)} |
|
|
|
{subCategories[selectedCategoryVideos.id].map( |
|
|
|
</Box> |
|
|
|
option => ( |
|
|
|
</FormControl> |
|
|
|
<MenuItem key={option.id} value={option.id}> |
|
|
|
</FiltersSubContainer> |
|
|
|
{option.name} |
|
|
|
<FiltersSubContainer> |
|
|
|
</MenuItem> |
|
|
|
<FiltersRow> |
|
|
|
) |
|
|
|
Videos |
|
|
|
)} |
|
|
|
<FiltersRadioButton |
|
|
|
</Select> |
|
|
|
checked={filterType === "videos"} |
|
|
|
</FormControl> |
|
|
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => { |
|
|
|
)} |
|
|
|
setFilterType("videos"); |
|
|
|
</Box> |
|
|
|
}} |
|
|
|
</FormControl> |
|
|
|
inputProps={{ "aria-label": "controlled" }} |
|
|
|
</FiltersSubContainer> |
|
|
|
/> |
|
|
|
<FiltersSubContainer> |
|
|
|
</FiltersRow> |
|
|
|
<FiltersRow> |
|
|
|
<FiltersRow> |
|
|
|
Videos |
|
|
|
Playlists |
|
|
|
<FiltersRadioButton |
|
|
|
<FiltersRadioButton |
|
|
|
checked={filterType === "videos"} |
|
|
|
checked={filterType === "playlists"} |
|
|
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => { |
|
|
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => { |
|
|
|
setFilterType("videos"); |
|
|
|
setFilterType("playlists"); |
|
|
|
}} |
|
|
|
}} |
|
|
|
inputProps={{ "aria-label": "controlled" }} |
|
|
|
inputProps={{ "aria-label": "controlled" }} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</FiltersRow> |
|
|
|
</FiltersRow> |
|
|
|
<FiltersRow> |
|
|
|
</FiltersSubContainer> |
|
|
|
Playlists |
|
|
|
<Button |
|
|
|
<FiltersRadioButton |
|
|
|
onClick={() => { |
|
|
|
checked={filterType === "playlists"} |
|
|
|
filtersToDefault(); |
|
|
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => { |
|
|
|
}} |
|
|
|
setFilterType("playlists"); |
|
|
|
sx={{ |
|
|
|
}} |
|
|
|
marginTop: "20px", |
|
|
|
inputProps={{ "aria-label": "controlled" }} |
|
|
|
}} |
|
|
|
/> |
|
|
|
variant="contained" |
|
|
|
</FiltersRow> |
|
|
|
> |
|
|
|
</FiltersSubContainer> |
|
|
|
reset |
|
|
|
<Button |
|
|
|
</Button> |
|
|
|
onClick={() => { |
|
|
|
<Button |
|
|
|
filtersToDefault(); |
|
|
|
onClick={() => { |
|
|
|
}} |
|
|
|
getVideosHandler(true); |
|
|
|
sx={{ |
|
|
|
}} |
|
|
|
marginTop: "20px", |
|
|
|
sx={{ |
|
|
|
}} |
|
|
|
marginTop: "20px", |
|
|
|
variant="contained" |
|
|
|
}} |
|
|
|
> |
|
|
|
variant="contained" |
|
|
|
reset |
|
|
|
> |
|
|
|
</Button> |
|
|
|
Search |
|
|
|
<Button |
|
|
|
</Button> |
|
|
|
onClick={() => { |
|
|
|
</FiltersContainer> |
|
|
|
getVideosHandler(true); |
|
|
|
</FiltersCol> |
|
|
|
}} |
|
|
|
<Grid item xs={12} md={10} lg={7} xl={8} sm={9}> |
|
|
|
sx={{ |
|
|
|
<ProductManagerRow> |
|
|
|
marginTop: "20px", |
|
|
|
<Box |
|
|
|
}} |
|
|
|
sx={{ |
|
|
|
variant="contained" |
|
|
|
width: "100%", |
|
|
|
> |
|
|
|
display: "flex", |
|
|
|
Search |
|
|
|
flexDirection: "column", |
|
|
|
</Button> |
|
|
|
alignItems: "center", |
|
|
|
</FiltersContainer> |
|
|
|
marginTop: "20px", |
|
|
|
</FiltersCol> |
|
|
|
}} |
|
|
|
<Grid item xs={12} md={10} lg={7} xl={8} sm={9}> |
|
|
|
> |
|
|
|
<ProductManagerRow> |
|
|
|
<SubtitleContainer |
|
|
|
<Box |
|
|
|
sx={{ |
|
|
|
sx={{ |
|
|
|
justifyContent: "flex-start", |
|
|
|
|
|
|
|
paddingLeft: "15px", |
|
|
|
|
|
|
|
width: "100%", |
|
|
|
width: "100%", |
|
|
|
maxWidth: "1400px", |
|
|
|
display: "flex", |
|
|
|
|
|
|
|
flexDirection: "column", |
|
|
|
|
|
|
|
alignItems: "center", |
|
|
|
|
|
|
|
marginTop: "20px", |
|
|
|
}} |
|
|
|
}} |
|
|
|
></SubtitleContainer> |
|
|
|
> |
|
|
|
<TabContext value={tabValue}> |
|
|
|
<SubtitleContainer |
|
|
|
<TabList |
|
|
|
sx={{ |
|
|
|
onChange={changeTab} |
|
|
|
justifyContent: "flex-start", |
|
|
|
textColor={"secondary"} |
|
|
|
paddingLeft: "15px", |
|
|
|
indicatorColor={"secondary"} |
|
|
|
width: "100%", |
|
|
|
> |
|
|
|
maxWidth: "1400px", |
|
|
|
<Tab |
|
|
|
}} |
|
|
|
label="All Videos" |
|
|
|
></SubtitleContainer> |
|
|
|
value={allTabValue} |
|
|
|
<TabContext value={tabValue}> |
|
|
|
sx={{ fontSize: tabFontSize }} |
|
|
|
<TabList |
|
|
|
/> |
|
|
|
onChange={changeTab} |
|
|
|
<Tab |
|
|
|
textColor={"secondary"} |
|
|
|
label="Subscriptions" |
|
|
|
indicatorColor={"secondary"} |
|
|
|
value={subscriptionTabValue} |
|
|
|
> |
|
|
|
sx={{ fontSize: tabFontSize }} |
|
|
|
<Tab |
|
|
|
/> |
|
|
|
label="All Videos" |
|
|
|
</TabList> |
|
|
|
value={allTabValue} |
|
|
|
<TabPanel value={allTabValue} sx={{ width: "100%" }}> |
|
|
|
sx={{ fontSize: tabFontSize }} |
|
|
|
<VideoList videos={videos} /> |
|
|
|
/> |
|
|
|
<LazyLoad |
|
|
|
<Tab |
|
|
|
onLoadMore={getVideosHandler} |
|
|
|
label="Subscriptions" |
|
|
|
isLoading={isLoading} |
|
|
|
value={subscriptionTabValue} |
|
|
|
></LazyLoad> |
|
|
|
sx={{ fontSize: tabFontSize }} |
|
|
|
</TabPanel> |
|
|
|
/> |
|
|
|
<TabPanel value={subscriptionTabValue} sx={{ width: "100%" }}> |
|
|
|
</TabList> |
|
|
|
{persistSelector.subscriptionList.length > 0 ? ( |
|
|
|
<TabPanel value={allTabValue} sx={{ width: "100%" }}> |
|
|
|
<> |
|
|
|
<VideoList videos={videos} /> |
|
|
|
<VideoList videos={videos} /> |
|
|
|
<LazyLoad |
|
|
|
<LazyLoad |
|
|
|
onLoadMore={getVideosHandler} |
|
|
|
onLoadMore={getVideosHandler} |
|
|
|
isLoading={isLoading} |
|
|
|
isLoading={isLoading} |
|
|
|
></LazyLoad> |
|
|
|
></LazyLoad> |
|
|
|
</TabPanel> |
|
|
|
</> |
|
|
|
<TabPanel value={subscriptionTabValue} sx={{ width: "100%" }}> |
|
|
|
) : ( |
|
|
|
{filteredSubscriptionList.length > 0 ? ( |
|
|
|
<div style={{ textAlign: "center" }}> |
|
|
|
<> |
|
|
|
You have no subscriptions |
|
|
|
<VideoList videos={videos} /> |
|
|
|
</div> |
|
|
|
<LazyLoad |
|
|
|
)} |
|
|
|
onLoadMore={getVideosHandler} |
|
|
|
</TabPanel> |
|
|
|
isLoading={isLoading} |
|
|
|
</TabContext> |
|
|
|
></LazyLoad> |
|
|
|
</Box> |
|
|
|
</> |
|
|
|
</ProductManagerRow> |
|
|
|
) : ( |
|
|
|
|
|
|
|
<div style={{ textAlign: "center" }}> |
|
|
|
|
|
|
|
You have no subscriptions |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
</TabPanel> |
|
|
|
|
|
|
|
</TabContext> |
|
|
|
|
|
|
|
</Box> |
|
|
|
|
|
|
|
</ProductManagerRow> |
|
|
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
<FiltersCol item xs={0} lg={3} xl={2}> |
|
|
|
|
|
|
|
<ListSuperLikeContainer /> |
|
|
|
|
|
|
|
</FiltersCol> |
|
|
|
</Grid> |
|
|
|
</Grid> |
|
|
|
<FiltersCol item xs={0} lg={3} xl={2}> |
|
|
|
|
|
|
|
<ListSuperLikeContainer /> |
|
|
|
|
|
|
|
</FiltersCol> |
|
|
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
</> |
|
|
|
</> |
|
|
|
); |
|
|
|
); |
|
|
|
}; |
|
|
|
}; |
|
|
|