diff --git a/src/components/Table/Filters/index.tsx b/src/components/Table/Filters/index.tsx index 5c9c2e1..213ca6a 100644 --- a/src/components/Table/Filters/index.tsx +++ b/src/components/Table/Filters/index.tsx @@ -3,8 +3,8 @@ import { HeaderType, type Filter, type Value } from '../types.ts'; export { default as SelectFilter } from './SelectFilter.tsx'; export { default as NumberFilter } from './NumberFilter.tsx'; -const filterString = (value: Value, data: any): boolean => { - return data.search(value) !== -1; +const filterString = (value: string, data: string): boolean => { + return data.toLowerCase().search(value.toLowerCase()) !== -1; }; const filterNumber = (value: Value, data: any): boolean => { if (!Array.isArray(value)) { diff --git a/src/components/Table/Table.tsx b/src/components/Table/Table.tsx index a4b75a5..4fb4f66 100644 --- a/src/components/Table/Table.tsx +++ b/src/components/Table/Table.tsx @@ -48,10 +48,8 @@ export default function Table({ data, headers }: Props): JSX.Element { // and because Astro don't allow me to pass JSX from an Astro file to a TSX file, // so I have to pass the formatted row as a string. // DON'T use this method on a public API - if (header.formatter != null) { - return ( -
- ); + if (header.hasCustomCell) { + return ; } if (header.type === HeaderType.Multiple) { diff --git a/src/components/Table/types.ts b/src/components/Table/types.ts index 995293c..e579009 100644 --- a/src/components/Table/types.ts +++ b/src/components/Table/types.ts @@ -13,7 +13,7 @@ export enum HeaderType { export interface Header { key: string; header: string; - formatter?: (data: DataItem) => string; + hasCustomCell: boolean; type: HeaderType; } diff --git a/src/content b/src/content index e740dda..2fed5c0 160000 --- a/src/content +++ b/src/content @@ -1 +1 @@ -Subproject commit e740dda6515e13c9632e1c560664d88492ebfe2f +Subproject commit 2fed5c0abfa4f778dc5acc6c4e7c527671ace48b diff --git a/src/pages/games/[...slug].astro b/src/pages/games/[...slug].astro index 8480d5b..f6116a6 100644 --- a/src/pages/games/[...slug].astro +++ b/src/pages/games/[...slug].astro @@ -5,6 +5,8 @@ import { GetStaticPaths, } from 'astro'; import { getCollection } from 'astro:content'; +import Layout from '@layouts/Layout.astro'; +import Toc from '@components/Toc/Toc'; export const getStaticPaths = (async () => { const games = await getCollection('games'); @@ -21,26 +23,8 @@ const entry = Astro.props; const { Content, headings } = await entry.render(); --- - - - -- The first version of this project was developed as a MVP. So this sites lacks many features I would like to add over time. - For an up to date roadmap, please visit the project README. + The first version of this project was developed as a MVP. So this sites lacks many features I would like to add over time. For an + up to date roadmap, please visit the project README.