diff --git a/src/assets/icons/gaming.webp b/src/assets/icons/gaming.webp new file mode 100644 index 0000000..578a122 Binary files /dev/null and b/src/assets/icons/gaming.webp differ diff --git a/src/assets/icons/media.webp b/src/assets/icons/media.webp new file mode 100644 index 0000000..1df0cbc Binary files /dev/null and b/src/assets/icons/media.webp differ diff --git a/src/assets/icons/software.webp b/src/assets/icons/software.webp new file mode 100644 index 0000000..eba5ebc Binary files /dev/null and b/src/assets/icons/software.webp differ diff --git a/src/constants/index.ts b/src/constants/index.ts index c37dac1..8388966 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -1,3 +1,8 @@ +import softwareIcon from '../assets/icons/software.webp' +import gamingIcon from '../assets/icons/gaming.webp' +import mediaIcon from '../assets/icons/media.webp' + + const useTestIdentifiers = true; export const QTUBE_VIDEO_BASE = useTestIdentifiers @@ -217,4 +222,10 @@ export const subCategories3: CategoryMap = { ] -}; \ No newline at end of file +}; + +export const icons = { + 1: softwareIcon, + 2: gamingIcon, + 3: mediaIcon +} \ No newline at end of file diff --git a/src/pages/Home/VideoList.tsx b/src/pages/Home/VideoList.tsx index 22450e7..0884ca0 100644 --- a/src/pages/Home/VideoList.tsx +++ b/src/pages/Home/VideoList.tsx @@ -59,7 +59,7 @@ import { setEditPlaylist, setEditVideo, } from "../../state/features/videoSlice"; -import { categories, subCategories, subCategories2, subCategories3 } from "../../constants"; +import { categories, icons, subCategories, subCategories2, subCategories3 } from "../../constants"; import { Playlists } from "../../components/Playlists/Playlists"; import { PlaylistSVG } from "../../assets/svgs/PlaylistSVG"; import BlockIcon from "@mui/icons-material/Block"; @@ -753,7 +753,12 @@ export const VideoList = ({ mode }: VideoListProps) => { gap: '25px', alignItems: 'center' }}> - + {icons[videoObj?.category] ? : ( + + )} + diff --git a/src/pages/Home/VideoListComponentLevel.tsx b/src/pages/Home/VideoListComponentLevel.tsx index 18cfa0e..95ed04d 100644 --- a/src/pages/Home/VideoListComponentLevel.tsx +++ b/src/pages/Home/VideoListComponentLevel.tsx @@ -19,7 +19,7 @@ import ResponsiveImage from '../../components/ResponsiveImage' import { formatDate, formatTimestampSeconds } from '../../utils/time' import { Video } from '../../state/features/videoSlice' import { queue } from '../../wrappers/GlobalWrapper' -import { QTUBE_VIDEO_BASE } from '../../constants' +import { QTUBE_VIDEO_BASE, icons } from '../../constants' import { formatBytes } from '../VideoContent/VideoContent' interface VideoListProps { @@ -192,7 +192,11 @@ export const VideoListComponentLevel = ({ mode }: VideoListProps) => { gap: '25px', alignItems: 'center' }}> - + {icons[videoObj?.category] ? : ( + + )}