diff --git a/web/components/common/StreamInfo/StreamInfo.tsx b/web/components/common/StreamInfo/StreamInfo.tsx index aed005432..80fee9bba 100644 --- a/web/components/common/StreamInfo/StreamInfo.tsx +++ b/web/components/common/StreamInfo/StreamInfo.tsx @@ -9,7 +9,6 @@ import { serverStatusState, } from '../../stores/ClientConfigStore'; import { ServerLogo } from '../../ui'; -import CategoryIcon from '../../ui/CategoryIcon/CategoryIcon'; import SocialLinks from '../../ui/SocialLinks/SocialLinks'; import s from './StreamInfo.module.scss'; import { ServerStatus } from '../../../interfaces/server-status.model'; @@ -54,10 +53,7 @@ export default function StreamInfo({ isMobile }: Props) {
{name}
-
- {title || summary} - -
+
{title || summary}
{tags.length > 0 && tags.map(tag => #{tag} )}
diff --git a/web/components/ui/CategoryIcon/CategoryIcon.module.scss b/web/components/ui/CategoryIcon/CategoryIcon.module.scss deleted file mode 100644 index 1a8b8e350..000000000 --- a/web/components/ui/CategoryIcon/CategoryIcon.module.scss +++ /dev/null @@ -1,4 +0,0 @@ -.icon > path { - width: 10px; - fill: var(--text-color); -} \ No newline at end of file diff --git a/web/components/ui/CategoryIcon/CategoryIcon.tsx b/web/components/ui/CategoryIcon/CategoryIcon.tsx deleted file mode 100644 index 25e9539f5..000000000 --- a/web/components/ui/CategoryIcon/CategoryIcon.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import React from 'react'; -import s from './CategoryIcon.module.scss'; - -import GAME from './icons/games.svg'; -import CHAT from './icons/chat.svg'; -import CONFERENCE from './icons/conference.svg'; -import GOVERNMENT from './icons/gov.svg'; -import RELIGION from './icons/religion.svg'; -import TECH from './icons/tech.svg'; -import MUSIC from './icons/music.svg'; - -interface Props { - tags: string[]; -} - -const ICON_MAPPING = { - game: GAME, - gamer: GAME, - games: GAME, - playing: GAME, - - chat: CHAT, - chatting: CHAT, - - conference: CONFERENCE, - event: CONFERENCE, - convention: CONFERENCE, - - government: GOVERNMENT, - - religion: RELIGION, - god: RELIGION, - church: RELIGION, - bible: RELIGION, - - tech: TECH, - technology: TECH, - code: TECH, - software: TECH, - linux: TECH, - development: TECH, - - music: MUSIC, - listening: MUSIC, -}; - -function getCategoryIconFromTags(tags: string[]): any { - const categories = tags.map(tag => ICON_MAPPING[tag]).filter(Boolean); - if (categories.length > 0) { - return categories[0]; - } - return null; -} - -export default function CategoryIcon({ tags }: Props) { - const Icon = getCategoryIconFromTags(tags); - if (!Icon) { - return null; - } - - return ; -} diff --git a/web/components/ui/CategoryIcon/icons/chat.svg b/web/components/ui/CategoryIcon/icons/chat.svg deleted file mode 100644 index 3404d7360..000000000 --- a/web/components/ui/CategoryIcon/icons/chat.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/web/components/ui/CategoryIcon/icons/conference.svg b/web/components/ui/CategoryIcon/icons/conference.svg deleted file mode 100644 index 7d0405b2e..000000000 --- a/web/components/ui/CategoryIcon/icons/conference.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/web/components/ui/CategoryIcon/icons/games.svg b/web/components/ui/CategoryIcon/icons/games.svg deleted file mode 100644 index b4192f6d9..000000000 --- a/web/components/ui/CategoryIcon/icons/games.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/web/components/ui/CategoryIcon/icons/gov.svg b/web/components/ui/CategoryIcon/icons/gov.svg deleted file mode 100644 index e865f2718..000000000 --- a/web/components/ui/CategoryIcon/icons/gov.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/web/components/ui/CategoryIcon/icons/music.svg b/web/components/ui/CategoryIcon/icons/music.svg deleted file mode 100644 index 8a27785b6..000000000 --- a/web/components/ui/CategoryIcon/icons/music.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/web/components/ui/CategoryIcon/icons/religion.svg b/web/components/ui/CategoryIcon/icons/religion.svg deleted file mode 100644 index 3d3709225..000000000 --- a/web/components/ui/CategoryIcon/icons/religion.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/web/components/ui/CategoryIcon/icons/tech.svg b/web/components/ui/CategoryIcon/icons/tech.svg deleted file mode 100644 index d7faa60b9..000000000 --- a/web/components/ui/CategoryIcon/icons/tech.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/web/stories/CategoryIcon.stories.tsx b/web/stories/CategoryIcon.stories.tsx deleted file mode 100644 index 659ccf977..000000000 --- a/web/stories/CategoryIcon.stories.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from 'react'; -import { ComponentStory, ComponentMeta } from '@storybook/react'; -import CategoryIcon from '../components/ui/CategoryIcon/CategoryIcon'; - -export default { - title: 'owncast/Components/Category icon', - component: CategoryIcon, - parameters: {}, -} as ComponentMeta; - -const Template: ComponentStory = args => ; - -export const Game = Template.bind({}); -Game.args = { - tags: ['games', 'fun'], -}; - -export const Chat = Template.bind({}); -Chat.args = { - tags: ['blah', 'chat', 'games', 'fun'], -}; - -export const Conference = Template.bind({}); -Conference.args = { - tags: ['blah', 'conference', 'games', 'fun'], -};