import { Show, For, createSignal, createMemo } from 'solid-js' import '../../styles/Search.scss' import type { Shout } from '../../graphql/types.gen' import { ArticleCard } from '../Feed/Card' import { sortBy } from '../../utils/sortby' import { t } from '../../utils/intl' import { by, setBy } from '../../stores/router' import { useArticlesStore } from '../../stores/zine/articles' type Props = { results: Shout[] } export const SearchPage = (props: Props) => { const { getSortedArticles } = useArticlesStore({ sortedArticles: props.results }) // FIXME server sort // const [q, setq] = createSignal(props?.q || '') // const articles = createMemo(() => { // const sorted = sortBy(articles(), by() || byRelevance) // return q().length > 3 // ? sorted.filter( // (a) => // a.title?.toLowerCase().includes(q().toLowerCase()) || // a.body?.toLowerCase().includes(q().toLowerCase()) // ) // : sorted // }) // // function handleQueryChange(ev) { // const el = ev.target as HTMLInputElement // const query = el.value // setq(query) // } // // function handleSubmit(ev) { // ev.preventDefault() // const el = ev.target as HTMLInputElement // const query = el.value // setq(query) // setBy('') // } return (
{/*FIXME*/} {/**/}
{/*FIXME*/} {/**/}
0}>

{t('Publications')}

{(article) => (
)}

{t('Topics')}

{t('Authors')}

) }