Hey is a decentralized and permissionless social media app built with Lens Protocol 🌿
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: add rewards menu item (#6078)

authored by yoginth.com and committed by

GitHub e35f428a 50e48f11

+37
+4
apps/web/src/components/Shared/Navbar/MobileDrawerMenu.tsx
··· 6 6 import Bookmarks from "@/components/Shared/Navbar/NavItems/Bookmarks"; 7 7 import Groups from "@/components/Shared/Navbar/NavItems/Groups"; 8 8 import Logout from "@/components/Shared/Navbar/NavItems/Logout"; 9 + import Rewards from "@/components/Shared/Navbar/NavItems/Rewards"; 9 10 import Settings from "@/components/Shared/Navbar/NavItems/Settings"; 10 11 import Support from "@/components/Shared/Navbar/NavItems/Support"; 11 12 import SwitchAccount from "@/components/Shared/Navbar/NavItems/SwitchAccount"; ··· 56 57 > 57 58 <YourAccount className={cn(itemClass, "px-4")} /> 58 59 </AccountLink> 60 + <Link onClick={handleCloseDrawer} to="/settings/rewards"> 61 + <Rewards className={cn(itemClass, "px-4")} /> 62 + </Link> 59 63 <Link onClick={handleCloseDrawer} to="/settings"> 60 64 <Settings className={cn(itemClass, "px-4")} /> 61 65 </Link>
+23
apps/web/src/components/Shared/Navbar/NavItems/Rewards.tsx
··· 1 + import { GiftIcon } from "@heroicons/react/24/outline"; 2 + import { memo } from "react"; 3 + import cn from "@/helpers/cn"; 4 + 5 + interface RewardsProps { 6 + className?: string; 7 + } 8 + 9 + const Rewards = ({ className = "" }: RewardsProps) => { 10 + return ( 11 + <div 12 + className={cn( 13 + "flex w-full items-center space-x-1.5 text-gray-700 text-sm dark:text-gray-200", 14 + className 15 + )} 16 + > 17 + <GiftIcon className="size-4" /> 18 + <div>Rewards</div> 19 + </div> 20 + ); 21 + }; 22 + 23 + export default memo(Rewards);
+10
apps/web/src/components/Shared/Navbar/SignedAccount.tsx
··· 5 5 import AccountLink from "@/components/Shared/Account/AccountLink"; 6 6 import MenuTransition from "@/components/Shared/MenuTransition"; 7 7 import Logout from "@/components/Shared/Navbar/NavItems/Logout"; 8 + import Rewards from "@/components/Shared/Navbar/NavItems/Rewards"; 8 9 import Settings from "@/components/Shared/Navbar/NavItems/Settings"; 9 10 import SwitchAccount from "@/components/Shared/Navbar/NavItems/SwitchAccount"; 10 11 import ThemeSwitch from "@/components/Shared/Navbar/NavItems/ThemeSwitch"; ··· 43 44 } 44 45 > 45 46 <YourAccount /> 47 + </MenuItem> 48 + <MenuItem 49 + as={Link} 50 + className={({ focus }: { focus: boolean }) => 51 + cn({ "dropdown-active": focus }, "menu-item") 52 + } 53 + to="/settings/rewards" 54 + > 55 + <Rewards /> 46 56 </MenuItem> 47 57 <MenuItem 48 58 as={Link}