Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hide the others filter in mobile #9953

Merged
merged 2 commits into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,17 @@

@include smallInclusive {
.filter-row {
flex-direction: column;
flex-direction: row;
align-items: flex-start;
gap: 8px;
gap: 2px;
}
}

@include extraSmall {
margin-top: 0;

.filter-section-right {
flex-direction: column;
flex-direction: row;
align-items: flex-start;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export const HeaderWithFilters = ({
// @ts-expect-error <StrictNullChecks/>
<div className="filter-row" ref={filterRowRef}>
<div className="filter-section">
<p className="filter-label">Sort</p>
{!isWindowExtraSmall && <p className="filter-label">Sort</p>}
<Select
selected={featuredFilter || ThreadFeaturedFilterTypes.Newest}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down Expand Up @@ -342,7 +342,7 @@ export const HeaderWithFilters = ({
</div>

<div className="filter-section filter-section-top">
<p className="filter-label">Filter</p>
{!isWindowExtraSmall && <p className="filter-label">Filter</p>}
<div className="filter-section filter-section-right">
{(topics || []).length > 0 && (
<Select
Expand Down Expand Up @@ -402,7 +402,7 @@ export const HeaderWithFilters = ({
}
/>
)}
{matchesContestFilterRoute ? (
{!isWindowExtraSmall && matchesContestFilterRoute ? (
<Select
selected={urlParams.status || 'all'}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down Expand Up @@ -432,7 +432,8 @@ export const HeaderWithFilters = ({
dropdownPosition={rightFiltersDropdownPosition}
/>
) : (
stages_enabled && (
stages_enabled &&
!isWindowExtraSmall && (
<Select
selected={selectedStage || 'All Stages'}
onSelect={(item) =>
Expand Down Expand Up @@ -466,34 +467,36 @@ export const HeaderWithFilters = ({
/>
)
)}
<Select
selected={dateRange || ThreadTimelineFilterTypes.AllTime}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
onSelect={(item: any) => {
onFilterSelect({
filterKey: 'dateRange',
filterVal: item.value as ThreadTimelineFilterTypes,
});
}}
options={[
{
id: 1,
value: ThreadTimelineFilterTypes.AllTime,
label: 'All Time',
},
{
id: 2,
value: ThreadTimelineFilterTypes.ThisMonth,
label: 'Month',
},
{
id: 3,
value: ThreadTimelineFilterTypes.ThisWeek,
label: 'Week',
},
]}
dropdownPosition={rightFiltersDropdownPosition}
/>
{!isWindowExtraSmall && (
<Select
selected={dateRange || ThreadTimelineFilterTypes.AllTime}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
onSelect={(item: any) => {
onFilterSelect({
filterKey: 'dateRange',
filterVal: item.value as ThreadTimelineFilterTypes,
});
}}
options={[
{
id: 1,
value: ThreadTimelineFilterTypes.AllTime,
label: 'All Time',
},
{
id: 2,
value: ThreadTimelineFilterTypes.ThisMonth,
label: 'Month',
},
{
id: 3,
value: ThreadTimelineFilterTypes.ThisWeek,
label: 'Week',
},
]}
dropdownPosition={rightFiltersDropdownPosition}
/>
)}
</div>
</div>
</div>
Expand Down
Loading