The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix/blog: make "select a category" legible, use Dropdown component (#3968)
kokrui68687196bf8e
diff --git a/www/package.json b/www/package.jsonindex 5a4297884e7..40ff6bd5001 100644--- a/www/package.json+++ b/www/package.json@@ -16,7 +16,7 @@"@mdx-js/react": "^1.6.22","@next/mdx": "^10.0.7","@supabase/supabase-js": "^1.6.0",- "@supabase/ui": "^0.22.0",+ "@supabase/ui": "^0.25.0","classnames": "2.2.6","date-fns": "2.10.0","gray-matter": "^4.0.2",diff --git a/www/pages/blog.tsx b/www/pages/blog.tsxindex b3d7650470e..2bad1896086 100644--- a/www/pages/blog.tsx+++ b/www/pages/blog.tsx@@ -10,7 +10,7 @@ import { getSortedPosts, getAllCategories } from '~/lib/posts'import authors from 'lib/authors.json'import DefaultLayout from '~/components/Layouts/Default'-import { Typography, Badge, Space, Select } from '@supabase/ui'+import { Typography, Badge, Space, Dropdown, Button, IconChevronDown } from '@supabase/ui'import PostTypes from '~/types/post'import BlogListItem from '~/components/Blog/BlogListItem'import BlogHeader from '~/components/Blog/BlogHeader'@@ -83,20 +83,32 @@ function Blog(props: any) {<div className="col-span-12 lg:col-span-4 mt-4 lg:mt-0"><Space className="lg:justify-end" size={6}><Typography.Text>Select a category</Typography.Text>- <Select- onChange={(e: React.ChangeEvent<HTMLSelectElement>) =>- setCategory(e.target.value)- }+ <Dropdown+ style={{+ height: '50vh',+ overflow: 'auto',+ }}+ overlay={[+ <Dropdown.RadioGroup value={category} onChange={setCategory}>+ <Dropdown.Radio key={'all'} value="all">+ Show all+ </Dropdown.Radio>+ {props.categories.map((categoryId: string) => (+ <Dropdown.Radio key={categoryId} value={categoryId}>+ {categoryId}+ </Dropdown.Radio>+ ))}+ </Dropdown.RadioGroup>,+ ]}>- <Select.Option key={'all'} value={'all'}>- Show all- </Select.Option>- {props.categories.map((categoryId: string) => (- <Select.Option key={categoryId} value={categoryId}>- {categoryId}- </Select.Option>- ))}- </Select>+ <Button+ type="outline"+ className="sbui-select--medium"+ iconRight={<IconChevronDown />}+ >+ {category === 'all' ? 'Show all' : category}+ </Button>+ </Dropdown></Space></div></div>