From cf7fe20aa6e62ebb873dfae1badaf85e76b8a9df Mon Sep 17 00:00:00 2001 From: Tickbase Date: Thu, 30 Apr 2026 20:59:58 +0200 Subject: [PATCH] Add epic games section #93 --- src/components/layout/Sidebar.tsx | 58 ++++++++++++++++++------------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx index fabeb83..599b19b 100644 --- a/src/components/layout/Sidebar.tsx +++ b/src/components/layout/Sidebar.tsx @@ -1,4 +1,5 @@ import { Icon, layers, linux, proton, settings } from '@/components/icons' +import { epic } from '@/components/icons' import { Button } from '@/components/buttons' interface SidebarProps { @@ -7,7 +8,6 @@ interface SidebarProps { onSettingsClick: () => void } -// Define a type for filter items that makes variant optional type FilterItem = { id: string label: string @@ -15,38 +15,49 @@ type FilterItem = { variant?: string } -/** - * Application sidebar component - * Contains filters for game types - */ const Sidebar = ({ setFilter, currentFilter, onSettingsClick }: SidebarProps) => { - // Available filter options with icons - const filters: FilterItem[] = [ + const steamFilters: FilterItem[] = [ { id: 'all', label: 'All Games', icon: layers, variant: 'solid' }, { id: 'native', label: 'Native', icon: linux, variant: 'brand' }, - { id: 'proton', label: 'Proton Required', icon: proton, variant: 'brand' }, + { id: 'proton', label: 'Proton', icon: proton, variant: 'brand' }, ] + const epicFilters: FilterItem[] = [ + { id: 'epic', label: 'All Games', icon: epic, variant: 'brand' }, + ] + + const renderFilter = (filter: FilterItem) => ( +
  • setFilter(filter.id)} + > +
    + + {filter.label} +
    +
  • + ) + return (

    Library

    - +
    + Steam +
      + {steamFilters.map(renderFilter)} +
    +
    + +
    + Epic Games +
      + {epicFilters.map(renderFilter)} +
    +
    -
    ) } -export default Sidebar +export default Sidebar \ No newline at end of file