From ee4690b2d5ad132477480295bdc1215bf1843215 Mon Sep 17 00:00:00 2001 From: kushagrasarathe <76868364+kushagrasarathe@users.noreply.github.com> Date: Mon, 20 Jan 2025 19:26:23 +0530 Subject: [PATCH 1/7] fix: remove bruddle config & use single tailwind config --- src/app/(mobile-ui)/layout.tsx | 4 +- src/app/(setup)/layout.tsx | 2 +- src/app/page.tsx | 6 +- src/assets/bg/peanut-bg.svg | 2 +- src/components/0_Bruddle/Button.tsx | 2 +- src/components/0_Bruddle/Field.tsx | 11 +- src/components/About/index.tsx | 8 +- .../Cashout/Components/Initial.view.tsx | 4 +- .../Claim/Generic/AlreadyClaimed.view.tsx | 8 +- src/components/Claim/Link/Initial.view.tsx | 24 +- .../Claim/Link/Onchain/Confirm.view.tsx | 16 +- .../Claim/Link/Onchain/Success.view.tsx | 4 +- .../Create/Components/RecentRecipients.tsx | 4 +- src/components/Create/Link/Confirm.view.tsx | 22 +- src/components/Create/Link/Success.view.tsx | 2 +- .../Dashboard/components/MobileComponent.tsx | 14 +- .../components/OptionsItemComponent.tsx | 14 +- .../Dashboard/components/SortComponent.tsx | 2 +- src/components/Dashboard/index.tsx | 6 +- .../Global/Banner/GenericBanner.tsx | 2 +- src/components/Global/Banner/index.tsx | 4 +- src/components/Global/ChainSelector/index.tsx | 4 +- .../Global/ConfirmDetails/Index.tsx | 4 +- src/components/Global/Header/index.tsx | 2 +- src/components/Global/ListItemView/index.tsx | 215 ++++++++++ src/components/Global/Modal/index.tsx | 4 +- src/components/Global/Search/index.tsx | 7 +- src/components/Global/Select/index.tsx | 10 +- src/components/Global/ToggleTheme/index.tsx | 4 +- .../Global/TokenAmountInput/index.tsx | 12 +- .../Components/AdvancedButton.tsx | 12 +- .../TokenSelector/Components/TokenDisplay.tsx | 2 +- .../Global/TokenSelector/TokenSelector.tsx | 6 +- .../Global/USBankAccountInput/index.tsx | 4 +- src/components/Global/WalletHeader/index.tsx | 2 +- .../Global/WalletNavigation/index.tsx | 6 +- src/components/Home/WalletCard.tsx | 4 +- .../LandingPage/BuildOnUs/index.tsx | 5 +- src/components/LandingPage/faq.tsx | 8 +- src/components/LandingPage/features.tsx | 39 +- src/components/LandingPage/hero.tsx | 8 +- src/components/LandingPage/story.tsx | 5 +- src/components/Offramp/Confirm.view.tsx | 32 +- src/components/Offramp/PromoCodeChecker.tsx | 8 +- src/components/Offramp/Success.view.tsx | 8 +- .../Components/MobileTableComponent.tsx | 16 +- .../Profile/Components/OptionsComponent.tsx | 2 +- .../Profile/Components/ProfileSection.tsx | 4 +- .../Components/ProfileWalletBalance.tsx | 2 +- .../Profile/Components/TableComponent.tsx | 18 +- src/components/Profile/Components/Tabs.tsx | 2 +- .../Components/ReferenceAndAttachment.tsx | 2 +- .../Views/GeneralViews/AlreadyPaid.view.tsx | 8 +- .../Request/Pay/Views/Initial.view.tsx | 12 +- .../Request/Pay/Views/Success.view.tsx | 2 +- src/components/Setup/Views/Signup.tsx | 2 +- .../Setup/components/SetupWrapper.tsx | 8 +- src/components/Welcome/welcomeSDK.tsx | 52 +-- src/styles/globals.bruddle.css | 4 - src/styles/globals.css | 69 ++-- tailwind.bruddle.js | 375 ------------------ tailwind.config.js | 73 +++- 62 files changed, 530 insertions(+), 693 deletions(-) create mode 100644 src/components/Global/ListItemView/index.tsx delete mode 100644 src/styles/globals.bruddle.css delete mode 100644 tailwind.bruddle.js diff --git a/src/app/(mobile-ui)/layout.tsx b/src/app/(mobile-ui)/layout.tsx index 82dc500f3..5d2c73587 100644 --- a/src/app/(mobile-ui)/layout.tsx +++ b/src/app/(mobile-ui)/layout.tsx @@ -5,6 +5,7 @@ import { useToast } from '@/components/0_Bruddle/Toast' import Modal from '@/components/Global/Modal' import WalletNavigation from '@/components/Global/WalletNavigation' import HomeWaitlist from '@/components/Home/HomeWaitlist' +import { ThemeProvider } from '@/config' import { peanutWalletIsInPreview } from '@/constants' import { useAuth } from '@/context/authContext' import { useWallet } from '@/hooks/useWallet' @@ -14,8 +15,7 @@ import classNames from 'classnames' import Link from 'next/link' import { usePathname } from 'next/navigation' import { useEffect, useMemo, useState } from 'react' -import '../../styles/globals.bruddle.css' -import { ThemeProvider } from '@/config' +import '../../styles/globals.css' const publicPathRegex = /^\/(request\/pay|claim)/ diff --git a/src/app/(setup)/layout.tsx b/src/app/(setup)/layout.tsx index 972e1c82b..ef56bf54e 100644 --- a/src/app/(setup)/layout.tsx +++ b/src/app/(setup)/layout.tsx @@ -5,7 +5,7 @@ import { useAppDispatch } from '@/redux/hooks' import { setupActions } from '@/redux/slices/setup-slice' import { useEffect } from 'react' import { setupSteps } from '../../components/Setup/Setup.consts' -import '../../styles/globals.bruddle.css' +import '../../styles/globals.css' const SetupLayout = ({ children }: { children?: React.ReactNode }) => { const dispatch = useAppDispatch() diff --git a/src/app/page.tsx b/src/app/page.tsx index 00166390f..b2c652b46 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,10 +1,10 @@ 'use client' -import { useState, useEffect } from 'react' import * as assets from '@/assets' import Layout from '@/components/Global/Layout' -import { Hero, FAQs, Features, Mike, Story, BuildOnUs } from '@/components/LandingPage' +import { BuildOnUs, FAQs, Features, Hero, Mike, Story } from '@/components/LandingPage' import { useFooterVisibility } from '@/context/footerVisibility' +import { useEffect, useState } from 'react' export default function LandingPage() { const hero = { @@ -154,7 +154,7 @@ export default function LandingPage() { -
+
diff --git a/src/assets/bg/peanut-bg.svg b/src/assets/bg/peanut-bg.svg index ce64e2f71..baeaee111 100644 --- a/src/assets/bg/peanut-bg.svg +++ b/src/assets/bg/peanut-bg.svg @@ -1,4 +1,4 @@ - + diff --git a/src/components/0_Bruddle/Button.tsx b/src/components/0_Bruddle/Button.tsx index 74b5c5cb5..97bb15912 100644 --- a/src/components/0_Bruddle/Button.tsx +++ b/src/components/0_Bruddle/Button.tsx @@ -24,7 +24,7 @@ const buttonVariants: Record = { 'transparent-light': 'btn-transparent-light', 'transparent-dark': 'btn-transparent-dark', green: 'bg-green-1', - yellow: 'bg-yellow-1', + yellow: 'bg-secondary-1', } const buttonSizes: Record = { diff --git a/src/components/0_Bruddle/Field.tsx b/src/components/0_Bruddle/Field.tsx index 735b7291b..2427c58c8 100644 --- a/src/components/0_Bruddle/Field.tsx +++ b/src/components/0_Bruddle/Field.tsx @@ -1,10 +1,9 @@ 'use client' -import Icon, { IconNameType } from '../Global/Icon' -import { useFormContext } from 'react-hook-form' import classNames from 'classnames' -import React from 'react' -import { DetailedHTMLProps, InputHTMLAttributes, useState } from 'react' +import React, { DetailedHTMLProps, InputHTMLAttributes, useState } from 'react' +import { useFormContext } from 'react-hook-form' +import Icon, { IconNameType } from '../Global/Icon' import BaseInput from './BaseInput' type FieldProps = DetailedHTMLProps, HTMLInputElement> & { @@ -34,7 +33,7 @@ export const Field = React.forwardRef( { 'pr-15': icon || type === 'password', '!border-green-1 pr-15': success, - '!border-pink-1 pr-15': error, + '!border-primary-1 pr-15': error, }, className )} @@ -62,7 +61,7 @@ export const Field = React.forwardRef( {(success || error) && ( diff --git a/src/components/About/index.tsx b/src/components/About/index.tsx index d7b1b7791..9d4c5bd58 100644 --- a/src/components/About/index.tsx +++ b/src/components/About/index.tsx @@ -1,6 +1,6 @@ import * as assets from '@/assets' -import { MarqueeComp } from '../Global/MarqueeWrapper' import { SmileStars } from '@/assets' +import { MarqueeComp } from '../Global/MarqueeWrapper' const listItems = [ { @@ -20,7 +20,7 @@ const listItems = [ { name: 'Lens', url: 'https://lenster.xyz/u/hugo0.lens' }, { name: 'www', url: 'https://hugomontenegro.com/' }, ], - bg: 'bg-purple-1', + bg: 'bg-primary-1', }, { name: 'Konrad Urban', @@ -37,7 +37,7 @@ const listItems = [ { name: 'Lens', url: 'https://lenster.xyz/u/kkonrad.lens' }, { name: 'www', url: 'https://kkonrad.com/' }, ], - bg: 'bg-yellow-1', + bg: 'bg-secondary-1', }, { name: '______ ______', @@ -51,7 +51,7 @@ const listItems = [ { name: 'dm us', url: 'https://www.peanut.to/jobs' }, { name: 'jobs', url: '/jobs' }, ], - bg: 'bg-pink-1', + bg: 'bg-primary-1', }, ] diff --git a/src/components/Cashout/Components/Initial.view.tsx b/src/components/Cashout/Components/Initial.view.tsx index dbc74fd83..e2e9fc215 100644 --- a/src/components/Cashout/Components/Initial.view.tsx +++ b/src/components/Cashout/Components/Initial.view.tsx @@ -332,7 +332,7 @@ export const InitialCashoutView = ({ className={twMerge( 'flex w-full items-center justify-between text-nowrap border border-black p-2', matchAccount(account, bankAccountNumber) - ? 'bg-purple-1' + ? 'bg-primary-1' : 'hover:bg-gray-100', xchainAllowed && 'cursor-pointer', !xchainAllowed && 'opacity-60' @@ -344,7 +344,7 @@ export const InitialCashoutView = ({