Skip to content

Commit

Permalink
fix: clearall button not working (#443)
Browse files Browse the repository at this point in the history
* fix: clearall button not working

* fix: banner mobile width
  • Loading branch information
lauti7 authored Feb 22, 2024
1 parent 78f6b08 commit 1ee7316
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/components/BannerMobile/index.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.banner-mobile {
max-width: 346px;
/* max-width: 346px; */
width: 100%;
height: 316px;
background: linear-gradient(180deg, #161518 0%, #6c27a1 100%);
Expand Down
3 changes: 1 addition & 2 deletions src/hooks/usePlaceCategoriesManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ export default function usePlaceCategoriesManager(
[setCategories]
)

const isFilteringByCategory =
categories.filter(({ active }) => active).length > 0
const isFilteringByCategory = (initActiveCategories || []).length > 0

return {
categories,
Expand Down
26 changes: 9 additions & 17 deletions src/pages/worlds.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import useFormatMessage from "decentraland-gatsby/dist/hooks/useFormatMessage"
import { navigate } from "decentraland-gatsby/dist/plugins/intl"
import API from "decentraland-gatsby/dist/utils/api/API"
import TokenList from "decentraland-gatsby/dist/utils/dom/TokenList"
import { Back } from "decentraland-ui/dist/components/Back/Back"
import { Button } from "decentraland-ui/dist/components/Button/Button"
import { Dropdown } from "decentraland-ui/dist/components/Dropdown/Dropdown"
import { HeaderMenu } from "decentraland-ui/dist/components/HeaderMenu/HeaderMenu"
Expand All @@ -29,13 +28,10 @@ import Grid from "semantic-ui-react/dist/commonjs/collections/Grid"
import Places from "../api/Places"
import Banner from "../components/Banner"
import BannerMobile from "../components/BannerMobile"
import {
CategoryFilter,
CategoryFilterProps,
} from "../components/Category/CategoryFilter"
import { CategoryFilterProps } from "../components/Category/CategoryFilter"
import { CategoryList } from "../components/Category/CategoryList"
import OnlyViewCategoryNavbar from "../components/Category/OnlyViewCategoryNavbar"
import SelectedCategoriesNavbar from "../components/Category/SelectedCategoriesNavbar"
import { Close } from "../components/Icon/Close"
import { Filter } from "../components/Icon/Filter"
import Navigation, { NavigationTab } from "../components/Layout/Navigation"
import NoResults from "../components/Layout/NoResults"
Expand Down Expand Up @@ -523,17 +519,13 @@ export default function WorldsPage() {
/>
)}
{params.only_view_category && (
<div className="only-view-category-navbar__box">
<Back onClick={() => toggleViewAllCategory(null, true)} />
<div>
<CategoryFilter
category={params.only_view_category}
active
onChange={() => toggleViewAllCategory(null, false)}
actionIcon={<Close width="20" height="20" />}
/>
</div>
</div>
<OnlyViewCategoryNavbar
onClickBack={() => toggleViewAllCategory(null, true)}
onClickCategoryFilter={() =>
toggleViewAllCategory(null, false)
}
category={params.only_view_category}
/>
)}
</div>
{showBanner &&
Expand Down

0 comments on commit 1ee7316

Please sign in to comment.