diff --git a/src/components/platformFilter/client.tsx b/src/components/platformFilter/client.tsx index 2a99b5321a832..eb89669416862 100644 --- a/src/components/platformFilter/client.tsx +++ b/src/components/platformFilter/client.tsx @@ -7,7 +7,7 @@ import {matchSorter, rankings} from 'match-sorter'; import Link from 'next/link'; import {type Platform} from 'sentry-docs/types'; -import {splitToChunks, uniqByReference} from 'sentry-docs/utils'; +import {uniqByReference} from 'sentry-docs/utils'; import styles from './style.module.scss'; @@ -70,19 +70,18 @@ export function PlatformFilterClient({platforms}: {platforms: Platform[]}) { return matches_; }, [filter, platformsAndGuides]); - const platformColumns: Platform[][] = splitToChunks( - 3, - uniqByReference(matches.map(x => (x.type === 'platform' ? x : x.platform))).map(p => { - return { - ...p, - guides: matches - .filter(m => m.type === 'guide' && m.platform.key === p.key) - .map(m => p.guides.find(g => g.key === m.key)!) - .filter(Boolean), - integrations: p.integrations.filter(i => matches.some(m => m.key === i.key)), - }; - }) - ); + const filteredPlatforms: Platform[] = uniqByReference( + matches.map(x => (x.type === 'platform' ? x : x.platform)) + ).map(p => { + return { + ...p, + guides: matches + .filter(m => m.type === 'guide' && m.platform.key === p.key) + .map(m => p.guides.find(g => g.key === m.key)!) + .filter(Boolean), + integrations: p.integrations.filter(i => matches.some(m => m.key === i.key)), + }; + }); return (