mirror of
https://github.com/SamyRai/tercul-frontend.git
synced 2025-12-27 04:51:34 +00:00
Improve the way users filter content on author profile pages for better results
Sets default "all" values for the filter selects on the AuthorProfile component. Replit-Commit-Author: Agent Replit-Commit-Session-Id: cbacfb18-842a-4116-a907-18c0105ad8ec Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/39b5c689-6e8a-4d5a-9792-69cc81a56534/c4c9ed1a-33f0-46ef-92eb-ae1545d4531d.jpg
This commit is contained in:
parent
fe7ce0bca1
commit
ccd24ed024
BIN
attached_assets/Screenshot_20250508-014816.png
Normal file
BIN
attached_assets/Screenshot_20250508-014816.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 133 KiB |
@ -437,12 +437,12 @@ export default function AuthorProfile() {
|
||||
<div className="flex flex-col sm:flex-row justify-between gap-4 items-start sm:items-center bg-navy/5 dark:bg-navy/10 p-4 rounded-lg">
|
||||
{/* Work type filters */}
|
||||
<div className="flex items-center gap-3 flex-wrap">
|
||||
<Select value={selectedWorkType || ""} onValueChange={(value) => setSelectedWorkType(value || null)}>
|
||||
<Select value={selectedWorkType || "all_types"} onValueChange={(value) => setSelectedWorkType(value === "all_types" ? null : value)}>
|
||||
<SelectTrigger className="w-[130px] text-sm h-9">
|
||||
<SelectValue placeholder="Work Type" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="">All Types</SelectItem>
|
||||
<SelectItem value="all_types">All Types</SelectItem>
|
||||
{workTypes.map(type => (
|
||||
<SelectItem key={type} value={type}>
|
||||
{formatTypeName(type)}
|
||||
@ -451,12 +451,12 @@ export default function AuthorProfile() {
|
||||
</SelectContent>
|
||||
</Select>
|
||||
|
||||
<Select value={selectedYear || ""} onValueChange={(value) => setSelectedYear(value || null)}>
|
||||
<Select value={selectedYear || "all_years"} onValueChange={(value) => setSelectedYear(value === "all_years" ? null : value)}>
|
||||
<SelectTrigger className="w-[130px] text-sm h-9">
|
||||
<SelectValue placeholder="Year" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="">All Years</SelectItem>
|
||||
<SelectItem value="all_years">All Years</SelectItem>
|
||||
{years.sort((a, b) => parseInt(a) - parseInt(b)).map(year => (
|
||||
<SelectItem key={year} value={year}>
|
||||
{year}
|
||||
@ -465,12 +465,12 @@ export default function AuthorProfile() {
|
||||
</SelectContent>
|
||||
</Select>
|
||||
|
||||
<Select value={selectedLanguage || ""} onValueChange={(value) => setSelectedLanguage(value || null)}>
|
||||
<Select value={selectedLanguage || "all_languages"} onValueChange={(value) => setSelectedLanguage(value === "all_languages" ? null : value)}>
|
||||
<SelectTrigger className="w-[130px] text-sm h-9">
|
||||
<SelectValue placeholder="Language" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="">All Languages</SelectItem>
|
||||
<SelectItem value="all_languages">All Languages</SelectItem>
|
||||
{languages.map(language => (
|
||||
<SelectItem key={language} value={language}>
|
||||
{language}
|
||||
@ -479,12 +479,12 @@ export default function AuthorProfile() {
|
||||
</SelectContent>
|
||||
</Select>
|
||||
|
||||
<Select value={selectedGenre || ""} onValueChange={(value) => setSelectedGenre(value || null)}>
|
||||
<Select value={selectedGenre || "all_genres"} onValueChange={(value) => setSelectedGenre(value === "all_genres" ? null : value)}>
|
||||
<SelectTrigger className="w-[130px] text-sm h-9">
|
||||
<SelectValue placeholder="Genre" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="">All Genres</SelectItem>
|
||||
<SelectItem value="all_genres">All Genres</SelectItem>
|
||||
{genres.map(genre => (
|
||||
<SelectItem key={genre} value={genre}>
|
||||
{genre}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user