File tree Expand file tree Collapse file tree 4 files changed +706
-892
lines changed
app/(main)/components/filter Expand file tree Collapse file tree 4 files changed +706
-892
lines changed Original file line number Diff line number Diff line change @@ -6,21 +6,21 @@ import { cn } from '@/lib/utils';
6
6
export function FilterBadge ( { filterType, value, onRemove } : FilterBadgeProps ) {
7
7
const getBadgeColor = ( ) => {
8
8
switch ( filterType ) {
9
- case 'difficulty ' :
9
+ case 'Difficulty ' :
10
10
return value === 'easy'
11
11
? 'bg-green-600'
12
12
: value === 'medium'
13
13
? 'bg-yellow-600'
14
14
: value === 'hard'
15
15
? 'bg-red-600'
16
16
: 'bg-gray-600' ;
17
- case 'status ' :
17
+ case 'Status ' :
18
18
return value === 'todo'
19
19
? 'bg-yellow-600'
20
20
: value === 'solved'
21
21
? 'bg-green-600'
22
22
: 'bg-gray-600' ;
23
- case 'topics ' :
23
+ case 'Topics ' :
24
24
return 'bg-indigo-600' ;
25
25
}
26
26
} ;
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ export default function FilterBar({
90
90
< div className = "flex flex-wrap gap-2" >
91
91
{ filters . difficulty && (
92
92
< FilterBadge
93
- filterType = "difficulty "
93
+ filterType = "Difficulty "
94
94
value = {
95
95
DIFFICULTY_OPTIONS . find ( ( opt ) => opt . value === filters . difficulty )
96
96
?. label || ''
@@ -100,7 +100,7 @@ export default function FilterBar({
100
100
) }
101
101
{ filters . status && (
102
102
< FilterBadge
103
- filterType = "status "
103
+ filterType = "Status "
104
104
value = {
105
105
STATUS_OPTIONS . find ( ( opt ) => opt . value === filters . status )
106
106
?. label || ''
@@ -112,7 +112,7 @@ export default function FilterBar({
112
112
filters . topics . map ( ( topic ) => (
113
113
< FilterBadge
114
114
key = { `topics-${ topic } ` }
115
- filterType = "topics "
115
+ filterType = "Topics "
116
116
value = { topic }
117
117
onRemove = { ( ) => removeFilter ( 'topics' , topic ) }
118
118
/>
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ interface ProblemDialogData {
18
18
}
19
19
20
20
interface FilterBadgeProps {
21
- filterType : 'difficulty ' | 'status ' | 'topics ' ;
21
+ filterType : 'Difficulty ' | 'Status ' | 'Topics ' ;
22
22
value : string ;
23
23
onRemove : ( filterType : string , value : string ) => void ;
24
24
}
You can’t perform that action at this time.
0 commit comments