diff --git a/src/components/Elements/MainModal/Main.jsx b/src/components/Elements/MainModal/Main.jsx index 025e5e09..6a3ac866 100644 --- a/src/components/Elements/MainModal/Main.jsx +++ b/src/components/Elements/MainModal/Main.jsx @@ -152,7 +152,8 @@ let tabs = [ function MainModal({ modalClose }) { let [activeTab, setActiveTab] = useState(tabs[0].id); - const [direction, setDirection] = useState(1); + let [subTab, setSubTab] = useState(""); + let [direction, setDirection] = useState(1); const variants = { enter: (direction) => ({ @@ -196,7 +197,7 @@ function MainModal({ modalClose }) { case 'marketplace': return ; default: - return ; + return ; } }; @@ -205,6 +206,7 @@ function MainModal({ modalClose }) {
{navbarLogo} + {subTab}
{ } setCurrentTab(tab); setCurrentName(name); + props.setSubTab(name); }; const hideReminder = () => { diff --git a/src/features/marketplace/components/Items/Items.jsx b/src/features/marketplace/components/Items/Items.jsx index 1f09718f..d5bd8597 100644 --- a/src/features/marketplace/components/Items/Items.jsx +++ b/src/features/marketplace/components/Items/Items.jsx @@ -2,6 +2,7 @@ import variables from 'config/variables'; import React, { memo } from 'react'; import { MdAutoFixHigh, MdOutlineArrowForward, MdOutlineOpenInNew } from 'react-icons/md'; import placeholderIcon from 'assets/icons/marketplace-placeholder.png'; +import { motion } from 'framer-motion'; import { Button } from 'components/Elements'; @@ -18,7 +19,13 @@ function filterItems(item, filter) { function ItemCard({ item, toggleFunction, type, onCollection, isCurator }) { item._onCollection = onCollection; return ( -
toggleFunction(item)} key={item.name}> + toggleFunction(item)} + key={item.name} + > ) : null}
-
+ ); } diff --git a/src/features/marketplace/views/Browse.jsx b/src/features/marketplace/views/Browse.jsx index cd58b8f6..305d6bf3 100644 --- a/src/features/marketplace/views/Browse.jsx +++ b/src/features/marketplace/views/Browse.jsx @@ -28,6 +28,7 @@ class Marketplace extends PureComponent { item: {}, collection: false, filter: '', + type: 'all', }; this.buttons = { uninstall: ( @@ -426,6 +427,35 @@ class Marketplace extends PureComponent {
)} +
+
{ + this.setState({ type: 'all' }); + this.getItems(); + }} + className="transition-all duration-200 bg-white rounded-full px-6 py-2 text-base text-black" + > + All +
+
{ + this.setState({ type: 'photo_packs' }); + this.getItems(); + }} + className="transition-all duration-200 bg-[#333] hover:bg-[#222222] cursor-pointer rounded-full px-6 py-2 text-base text-white" + > + Photo Packs +
+
{ + this.setState({ type: 'quote_packs' }); + this.getItems(); + }} + className="transition-all duration-200 bg-[#333] hover:bg-[#222222] cursor-pointer rounded-full px-6 py-2 text-base text-white" + > + Quote Packs +
+
{this.props.type === 'collections' && !this.state.collection ? ( this.state.items.map((item) => !item.news ? ( @@ -455,7 +485,7 @@ class Marketplace extends PureComponent { ) ) : ( props.changeTab(type)} current="settings" modalClose={props.modalClose}> + props.changeTab(type)} current="settings" modalClose={props.modalClose}> {sections.map(({ label, name, component: Component }) => (