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

fix: state of empty cards #171

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
84b6325
feat: add onest-font in application
heronlancellot Dec 12, 2023
c61f190
feat: add fonts & dark/light mode
heronlancellot Dec 18, 2023
2f9f9a7
Merge pull request #36 from blockful-io/feat/add-fonts
heronlancellot Dec 18, 2023
cb6b328
refactor: adjust imports
heronlancellot Dec 18, 2023
f97e6b5
feat: add swaplace header icons
heronlancellot Dec 18, 2023
53c7fd8
Merge pull request #37 from blockful-io/feat/header
heronlancellot Dec 18, 2023
4ec10ab
feat: add prettier
heronlancellot Dec 19, 2023
d1aeb68
feat: add CONTRIBUTING.MD
heronlancellot Dec 19, 2023
82258c1
Merge pull request #41 from blockful-io/feat/contributing-md
heronlancellot Dec 19, 2023
0643029
feat: add empty-cards
heronlancellot Dec 20, 2023
f88188d
Merge pull request #43 from heronlancellot/feat/empty-cards
heronlancellot Dec 20, 2023
8cbd7d5
feat: add swap offers filter
heronlancellot Dec 21, 2023
d93ed66
Merge pull request #47 from heronlancellot/feat/filter-offers
heronlancellot Dec 21, 2023
23f4862
feat: add create-swap
heronlancellot Dec 23, 2023
9ee7920
Merge pull request #49 from heronlancellot/feat/sm-connection-create-…
heronlancellot Dec 23, 2023
5ddcdd5
feat: add create-swap-n-n
heronlancellot Dec 27, 2023
b2373ee
Merge pull request #52 from heronlancellot/feat/create-swap-n-n
heronlancellot Dec 27, 2023
31cbbd0
feat: add approve tokens nft
heronlancellot Jan 2, 2024
ea64792
Merge pull request #55 from heronlancellot/feat/approve-swap-nfts
heronlancellot Jan 2, 2024
85f63af
feat: add getApprovedSwap
heronlancellot Jan 3, 2024
027b7fb
feat: add create array approved
heronlancellot Jan 5, 2024
8cd2e35
feat: add initial structure getSelectedNftsApproval
heronlancellot Jan 5, 2024
b1209e3
feat: renamed some functions
FrancoAguzzi Jan 5, 2024
aae2e63
fix: token approved if-else statement
heronlancellot Jan 5, 2024
5de0ffe
feat: add validations in UI create-swap
heronlancellot Jan 6, 2024
973612b
feat: add scroll in offer-sumary
heronlancellot Jan 6, 2024
bfce120
feat: add onClick not enabled in Create-swap
heronlancellot Jan 8, 2024
b0fe2db
feat: add community standards docs
heronlancellot Jan 13, 2024
e623c0b
Merge pull request #58 from heronlancellot/feat/docs-community
heronlancellot Jan 13, 2024
ee6c30f
Merge branch 'blockful-io:main' into feat/get-approved-tokens
heronlancellot Jan 15, 2024
c927953
Merge branch 'develop' into feat/get-approved-tokens
heronlancellot Jan 15, 2024
f17869b
Merge pull request #59 from heronlancellot/feat/get-approved-tokens
heronlancellot Jan 15, 2024
33bfc60
feat: add approval-modal
heronlancellot Jan 16, 2024
3d60696
refactor: swap-modal confirmation
heronlancellot Jan 19, 2024
e2007d8
feat: Created Swap Modal status state inside SwapContext
FrancoAguzzi Jan 19, 2024
9524c6c
refactor: component refactor
heronlancellot Jan 23, 2024
378eb52
feat: Reusing generic TransactionStatus enum
FrancoAguzzi Jan 23, 2024
f626966
feat: add generic swap confirmation modal
heronlancellot Jan 24, 2024
17aabfa
refactor: card style
heronlancellot Jan 24, 2024
700d813
refactor: modal style nfts
heronlancellot Jan 24, 2024
a9def41
refator: css modal component
heronlancellot Jan 24, 2024
fb38bb1
fix: add condition to styleType in Nft Card
heronlancellot Jan 24, 2024
6e4765d
Created new SwapModalSteps
FrancoAguzzi Jan 25, 2024
1b15215
refactor: swap transaction status
heronlancellot Jan 26, 2024
4d0627d
Merge pull request #63 from heronlancellot/feat/approval-modal
heronlancellot Jan 26, 2024
dbb3649
implement layout of SwapOfferDetails stateless component
Stasn13 Jan 26, 2024
32d47db
feat: add tooltips && adjust TheHeader icons with tooltips
heronlancellot Jan 31, 2024
fc21c9c
Merge pull request #70 from heronlancellot/feat/tooltip
heronlancellot Jan 31, 2024
d108ffc
Merge branch 'develop' of https://github.com/blockful-io/swaplace-dap…
Stasn13 Feb 1, 2024
c3edc53
remove SwapOfferDetails from OfferSummary
Stasn13 Feb 1, 2024
2d396e7
Merge pull request #64 from Stasn13/feat/create-a-swap-offer-details
heronlancellot Feb 2, 2024
0aa6055
adjust auth router push
eduramme Feb 6, 2024
63bc8fe
Merge pull request #84 from blockful-io/feat/adjust-auth-router
heronlancellot Feb 6, 2024
3a89bde
Configured ESLint and fixed lint errors
FrancoAguzzi Feb 7, 2024
98da18a
Merge pull request #85 from heronlancellot/develop
heronlancellot Feb 7, 2024
1d7e454
Removed unused import
FrancoAguzzi Feb 7, 2024
8fc8b4c
Merge branch 'blockful-io:develop' into develop
heronlancellot Feb 7, 2024
757c46c
Merge pull request #86 from heronlancellot/develop
heronlancellot Feb 7, 2024
7397e6d
fix header active tab icon
eduramme Feb 7, 2024
15ec4d6
create dark and light mode improvements
eduramme Feb 8, 2024
2a8ff1e
Merge branch 'blockful-io:main' into feat/axios-subgraph
RafaDSan Feb 8, 2024
7371de8
feat: .env.example updated to have subgraph infos
RafaDSan Feb 8, 2024
7d5baa5
feat: package.json updated to have axios and dotenv
RafaDSan Feb 8, 2024
3dbf66a
feat: script with axios to query data with subgraph
RafaDSan Feb 8, 2024
3f7fd26
Merge branch 'develop' into feat/header-adjustments
eduramme Feb 8, 2024
44069a4
fix: ENDPOINT_URL is now pointing to the correct subgraph. The previo…
RafaDSan Feb 8, 2024
a2ed1fa
fix: removed lines that were causing the dapp to close
RafaDSan Feb 8, 2024
4889752
Merge pull request #99 from RafaDSan/feat/axios-subgraph
heronlancellot Feb 9, 2024
effb3de
resolve requested changes
eduramme Feb 9, 2024
fb61435
Created ENSAvatar component
FrancoAguzzi Feb 9, 2024
fa0cf60
Merge branch 'develop' into refactor-nft-card
FrancoAguzzi Feb 9, 2024
e0fb2a7
theHeader disalbed icons improvement
eduramme Feb 9, 2024
305a213
fix icon colors
eduramme Feb 9, 2024
c1660c5
Update SwappingIcons.tsx
heronlancellot Feb 13, 2024
6a92dca
Merge pull request #100 from blockful-io/feat/header-adjustments
heronlancellot Feb 13, 2024
c7be66e
Update SwappingIcons.tsx
heronlancellot Feb 13, 2024
714b209
Merge branch 'feat/header-adjustments' into feat/icons-not-allowed-click
heronlancellot Feb 13, 2024
f048318
Merge pull request #105 from blockful-io/feat/icons-not-allowed-click
heronlancellot Feb 13, 2024
d36992a
closes #69
blackbeard002 Feb 13, 2024
ed1ef59
Merge pull request #114 from blackbeard002/link
heronlancellot Feb 14, 2024
f424a26
Created useENSData React hook
FrancoAguzzi Feb 14, 2024
f56176c
feat: add swap manually modal
heronlancellot Feb 14, 2024
70dbcb8
feat: add open&close & resize to mobile devices
heronlancellot Feb 15, 2024
c3d5ca1
feat: add light/dark mode in component
heronlancellot Feb 15, 2024
a0e010c
feat:add background opacity when open dialog
heronlancellot Feb 15, 2024
e182315
update: text color in light mode
heronlancellot Feb 15, 2024
485ff63
update: globals css
heronlancellot Feb 15, 2024
f3a7023
fix header
eduramme Feb 15, 2024
71901d0
fix icon errors
eduramme Feb 15, 2024
4f46688
Merge pull request #119 from heronlancellot/feat/swap-manually-modal
heronlancellot Feb 15, 2024
64e495d
merge develop
eduramme Feb 15, 2024
7cece72
fix grid
eduramme Feb 15, 2024
4c964c1
fix active tba
eduramme Feb 15, 2024
b545fd6
feat: add error finding swap offers component
heronlancellot Feb 16, 2024
936326a
update: requested-changes
heronlancellot Feb 16, 2024
d28e829
Merge pull request #126 from heronlancellot/feat/add-error-finding-sw…
heronlancellot Feb 16, 2024
924a564
closes #125
blackbeard002 Feb 16, 2024
68ed85b
Closes #125
blackbeard002 Feb 16, 2024
3a3a87e
Fixed copyright typo
FrancoAguzzi Feb 16, 2024
9b5981f
Fixed ENSAvatar component loading state
FrancoAguzzi Feb 16, 2024
a218835
Fixed lint issues
FrancoAguzzi Feb 16, 2024
3237cd6
Merge remote-tracking branch 'origin/main' into refactor-nft-card
FrancoAguzzi Feb 16, 2024
014ab9e
Merge remote-tracking branch 'origin/main' into refactor-nft-card
FrancoAguzzi Feb 16, 2024
9fcd10d
Merge pull request #2 from blockful-io/develop
FrancoAguzzi Feb 16, 2024
5b8bb0a
Installed ethers
FrancoAguzzi Feb 16, 2024
d810667
Updated useENSData avatar query status setter
FrancoAguzzi Feb 16, 2024
e884ad0
Merge pull request #127 from blackbeard002/sbar
heronlancellot Feb 16, 2024
c2876d2
Merge remote-tracking branch 'origin/develop' into refactor-nft-card
FrancoAguzzi Feb 16, 2024
b3e1f3b
Updated useENSData avatar query status setter
FrancoAguzzi Feb 16, 2024
9453a59
feat: adding public project id for wallet connect client
0xneves Feb 16, 2024
c65e576
Merge pull request #103 from FrancoAguzzi/refactor-nft-card
eduramme Feb 16, 2024
ea4436c
create sidebar component
eduramme Feb 17, 2024
9509d60
apply blur on background
eduramme Feb 17, 2024
a9d1877
fix blur
eduramme Feb 17, 2024
a9bf2af
remove console log
eduramme Feb 17, 2024
c3e4074
closes #128
blackbeard002 Feb 17, 2024
9e696da
Create TheSidebarHeader for the WalletSidebarTemplate
eduramme Feb 17, 2024
e4381cc
create design
eduramme Feb 17, 2024
abc5277
disconnect wallet when disconnect button clicked
eduramme Feb 17, 2024
b2ff479
Merge pull request #130 from blackbeard002/rename
heronlancellot Feb 17, 2024
0d5aa8e
fix: add pr 103 at a218835
heronlancellot Feb 19, 2024
cad5bbe
fix: add pr 103 at fc3e13f
heronlancellot Feb 19, 2024
766aa6f
fix: add pr 103 at 986fd05
heronlancellot Feb 19, 2024
d447b83
fix: add pr 103 package.json
heronlancellot Feb 19, 2024
bab13fb
fix: packages & verify error dapp
heronlancellot Feb 19, 2024
d439839
feat: add padding search-bar
heronlancellot Feb 20, 2024
4921fa8
feat: add 0xneves CODEOWNER
heronlancellot Feb 20, 2024
1aaa22c
Merge pull request #134 from heronlancellot/merge-103
0xneves Feb 20, 2024
0daef99
Merge branch 'develop' into feat/header-walletsidebar
eduramme Feb 20, 2024
3bc454c
Merge branch 'develop' into feat/background-walletsidebar
eduramme Feb 20, 2024
b88e778
remove 'connect wallet' text
eduramme Feb 20, 2024
454b9cd
resolve requested changes
eduramme Feb 20, 2024
d18b684
Merge pull request #129 from eduramme/feat/background-walletsidebar
heronlancellot Feb 20, 2024
227f723
merge develop
eduramme Feb 20, 2024
4dfc5fb
Merge pull request #132 from eduramme/feat/header-walletsidebar
eduramme Feb 20, 2024
73a962b
create user info component
eduramme Feb 20, 2024
9ae9be2
feat: add a active status to StatusOffers atom
GJOM Feb 20, 2024
509b93b
feat: add layout to display swap offers error & no swaps
heronlancellot Feb 20, 2024
91c96ce
display address and basic user info
eduramme Feb 20, 2024
25a28f3
Merge pull request #136 from heronlancellot/feat/swap-offers-display-…
heronlancellot Feb 20, 2024
54d2f25
refactor: component design refactor
gabrieljolvm Feb 21, 2024
7fc1019
Update StatusOffers.tsx
heronlancellot Feb 21, 2024
d44c72e
Merge pull request #138 from gabrieljolvm/feat/refactor-OfferFilters
heronlancellot Feb 21, 2024
bbf08d6
update: imports walletSide-bar
heronlancellot Feb 21, 2024
53545b8
update: gap icons & colors & remove console.log
heronlancellot Feb 21, 2024
302eb23
Merge branch 'develop' into feat/user-info-sidebar
heronlancellot Feb 21, 2024
a0b8718
Merge pull request #137 from eduramme/feat/user-info-sidebar
0xneves Feb 21, 2024
ff722f8
create block explorer link
eduramme Feb 21, 2024
f3b0f7f
create balance status
eduramme Feb 21, 2024
2ad62d9
create balance for connected chain
eduramme Feb 21, 2024
69ffcdf
get default explorer address
eduramme Feb 21, 2024
9f84d48
feat: Offer Expiry Confirm Swap Atom
Feb 21, 2024
9aef83c
fix copy paste address button
eduramme Feb 22, 2024
a61ea05
update: import to @/components
heronlancellot Feb 22, 2024
bc7d8ba
Merge pull request #140 from eduramme/feat/show-wallet-balance
eduramme Feb 22, 2024
85a1d21
Merge pull request #139 from eduramme/feat/profile-info-scanner
eduramme Feb 22, 2024
6e7e018
Merge pull request #141 from devsamuelsantiago/feat/offer-expiration-…
eduramme Feb 22, 2024
e296191
feat: add token card properties
heronlancellot Feb 22, 2024
4ee2d16
docs: cleared instructions on README.md
0xneves Feb 22, 2024
ae9360a
Merge pull request #142 from heronlancellot/feat/token-card-properties
0xneves Feb 22, 2024
b478a36
Update README.md
heronlancellot Feb 22, 2024
308a3ea
Merge pull request #144 from 0xneves/develop
0xneves Feb 22, 2024
aefee2a
feat: add TokensOfferSkeleton
heronlancellot Feb 23, 2024
1ad1275
Merge pull request #148 from heronlancellot/feat/tokens-offer-skeleton
heronlancellot Feb 23, 2024
3e5fe50
feat: add Offer Tag Component
heronlancellot Feb 23, 2024
e8d4296
Merge pull request #149 from heronlancellot/feat/offer-tag
0xneves Feb 23, 2024
a75511e
feat: add three dots card offers options
heronlancellot Feb 23, 2024
58c3d31
feat: add tooltip in export
heronlancellot Feb 23, 2024
65f9f41
Merge pull request #150 from heronlancellot/feat/three-dots-card-offe…
0xneves Feb 23, 2024
9f8e828
feat: add swap-offer details component
heronlancellot Feb 23, 2024
0b79c7c
Merge pull request #151 from heronlancellot/feat/swap-offer-details
0xneves Feb 23, 2024
45aed80
feat:adjust some types & add globals.css & adjust text in token-prope…
heronlancellot Feb 23, 2024
1389b8c
feat: add user offer info
heronlancellot Feb 23, 2024
340e588
Merge pull request #153 from heronlancellot/feat/user-offer-info
0xneves Feb 23, 2024
5ae165c
feat: add card offers & move swapStation to organism
heronlancellot Feb 23, 2024
10c23b6
update: change the SwapOfferDetails to TokenOfferDetails
heronlancellot Feb 23, 2024
17ecd8f
Merge pull request #154 from heronlancellot/feat/card-offers
0xneves Feb 23, 2024
79b4ed0
feat: add swap icon
heronlancellot Feb 23, 2024
25f9c15
feat: add TokenOffers
heronlancellot Feb 23, 2024
f756561
feat: add token offers in OfferSection
heronlancellot Feb 23, 2024
6ddf595
Merge pull request #155 from heronlancellot/feat/token-offers
0xneves Feb 23, 2024
81818c7
feat: Add Token Manually Atom/Button
Feb 23, 2024
5642cd7
closes #122
blackbeard002 Feb 23, 2024
731e626
Merge pull request #162 from blackbeard002/networks
0xneves Feb 23, 2024
153cda2
feat: Add Token Manually Atom/Button
Feb 24, 2024
7abc4e3
Merge branch 'blockful-io:main' into feat/add-token-manually-atom
devsamuelsantiago Feb 24, 2024
d464455
refactor: tooltip adjust
Feb 24, 2024
df0ab09
refactor: add address search function just by typing it
gabrieljolvm Feb 26, 2024
8ee9364
refactor: add address search function just by typing it
gabrieljolvm Feb 26, 2024
788a5b5
update: improvements in EmptyNftsCards to fill all the items
heronlancellot Feb 26, 2024
a1a8dff
fix: word correction lenght to length
heronlancellot Feb 26, 2024
85dada9
update: plus icon import to @/components
heronlancellot Feb 26, 2024
965bcff
update: tooltip classname for greater readability
heronlancellot Feb 26, 2024
7c236b2
Merge pull request #163 from devsamuelsantiago/refactor/adjust-tooltip
heronlancellot Feb 26, 2024
e04ea86
update: globals.css to input autofill bg
heronlancellot Feb 26, 2024
8331fd6
update: console.log to console.error
heronlancellot Feb 26, 2024
82cf624
Merge pull request #168 from gabrieljolvm/feat/search-bar-design-and-…
heronlancellot Feb 26, 2024
989e509
Merge pull request #158 from devsamuelsantiago/feat/add-token-manuall…
0xneves Feb 27, 2024
d3fbdb6
fix: state of empty cards
Feb 27, 2024
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
36 changes: 35 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,40 @@
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=50db9e195634356bb8ab0375a9f07607
NEXT_PUBLIC_ALCHEMY_ETHEREUM_HTTP=
NEXT_PUBLIC_ALCHEMY_ETHEREUM_KEY=
NEXT_PUBLIC_ALCHEMY_SEPOLIA_HTTP=
NEXT_PUBLIC_ALCHEMY_SEPOLIA_KEY=
NEXT_PUBLIC_ALCHEMY_POLYGON_HTTP=
NEXT_PUBLIC_ALCHEMY_POLYGON_KEY=
NEXT_PUBLIC_ALCHEMY_MUMBAI_HTTP=
NEXT_PUBLIC_ALCHEMY_MUMBAI_KEY=
NEXT_PUBLIC_ALCHEMY_ETHEREUM_HTTP=
NEXT_PUBLIC_ALCHEMY_OPTIMISM_HTTP=
NEXT_PUBLIC_ALCHEMY_OPTIMISM_KEY=
NEXT_PUBLIC_ALCHEMY_OPGOERLI_HTTP=
NEXT_PUBLIC_ALCHEMY_OPGOERLI_KEY=
NEXT_PUBLIC_ALCHEMY_OPSEPOLIA_HTTP=
NEXT_PUBLIC_ALCHEMY_OPSEPOLIA_KEY=
NEXT_PUBLIC_ALCHEMY_AVALANCHE_HTTP=
NEXT_PUBLIC_ALCHEMY_AVALANCHE_KEY=
NEXT_PUBLIC_ALCHEMY_FUJI_HTTP=
NEXT_PUBLIC_ALCHEMY_FUJI_KEY=
NEXT_PUBLIC_ALCHEMY_BASE_HTTP=
NEXT_PUBLIC_ALCHEMY_BASE_KEY=
NEXT_PUBLIC_ALCHEMY_BASEGOERLI_HTTP=
NEXT_PUBLIC_ALCHEMY_BASEGOERLI_KEY=
NEXT_PUBLIC_ALCHEMY_BNBTESTNET_HTTP=
NEXT_PUBLIC_ALCHEMY_BNBTESTNET_KEY=
NEXT_PUBLIC_ALCHEMY_ARBITRUMONE_HTTP=
NEXT_PUBLIC_ALCHEMY_ARBITRUMONE_KEY=
NEXT_PUBLIC_ALCHEMY_ARBITRUMSEPOLIA_HTTP=
NEXT_PUBLIC_ALCHEMY_ARBITRUMSEPOLIA_KEY=

# Subgraph endpoint production query

# ENDPOINT_URL=https://gateway.testnet.thegraph.com/api/[api-key]/subgraphs/id/EynHJVht9r6xhaZEPCyLYLd4EqBq8msf4jTrw1Vwg8ZV


# Subgraph endpoint production query

NEXT_PUBLIC_ENDPOINT_URL=https://api.studio.thegraph.com/query/57887/swaplace-subgraph-sepolia/version/latest

NEXT_PUBLIC_SUBGRAPH_AUTH_KEY=3b2048f02febad918a35bbafe78b2115
6 changes: 3 additions & 3 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ name: ESLint

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
branches: ["main"]
schedule:
- cron: '16 6 * * 3'
- cron: "16 6 * * 3"

jobs:
eslint:
Expand Down
5 changes: 5 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
trailingComma: "all"
singleQuote: false
printWidth: 80
tabWidth: 2
semi: true
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Default owners for everything in the repo

* @FrancoAguzzi @heronlancellot @eduramme
- @FrancoAguzzi @heronlancellot @eduramme @0xneves
191 changes: 0 additions & 191 deletions components/01-atoms/ConfirmSwapModal.tsx

This file was deleted.

12 changes: 7 additions & 5 deletions components/01-atoms/ConnectWallet.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { WalletIcon } from "@/components/01-atoms";
import { ConnectButton } from "@rainbow-me/rainbowkit";
import { useRouter } from "next/router";

interface IConnectWallet {
customStyle?: string;
walletIcon?: boolean;
}

export const ConnectWallet = ({ customStyle }: IConnectWallet) => {
export const ConnectWallet = ({ customStyle, walletIcon }: IConnectWallet) => {
const router = useRouter();

return (
Expand Down Expand Up @@ -44,10 +46,10 @@ export const ConnectWallet = ({ customStyle }: IConnectWallet) => {
return (
<button
onClick={openConnectModal}
type="button"
className={customStyle}
type="button"
>
Connect Wallet
{walletIcon ? <WalletIcon /> : <p>Connect Wallet</p>}
</button>
);
}
Expand All @@ -65,7 +67,7 @@ export const ConnectWallet = ({ customStyle }: IConnectWallet) => {
<div className="flex gap-3 xl:flex-col">
<button
onClick={openChainModal}
className="bg-[#e8e8e8] shadow-md border-2 border-[#e8e8e8] hover:bg-[#f8f8f8] rounded px-4 transition hidden md:flex items-center"
className="bg-[#e8e8e8] dark:bg-[#353836] dark:hover:bg-[#4b514d] dark:border-none shadow-md border-2 border-[#e8e8e8] hover:bg-[#f8f8f8] rounded px-4 hidden md:flex items-center"
type="button"
>
{chain.hasIcon && (
Expand All @@ -92,7 +94,7 @@ export const ConnectWallet = ({ customStyle }: IConnectWallet) => {
</button>
<button
onClick={openAccountModal}
className="p-4 py-2 bg-[#e8e8e8] shadow-md border-2 border-[#e8e8e8] hover:bg-[#f8f8f8] rounded transition"
className="p-4 py-2 bg-[#e8e8e8] dark:bg-[#353836] dark:hover:bg-[#4b514d] dark:border-none shadow-md border-2 border-[#e8e8e8] hover:bg-[#f8f8f8] rounded"
type="button"
>
{account.displayName}
Expand Down
31 changes: 31 additions & 0 deletions components/01-atoms/DisconnectWallet.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { PowerIcon } from "./icons/PowerIcon";
import { useSidebar } from "@/lib/client/contexts/SidebarContext.tsx";
import { useDisconnect } from "wagmi";
import cc from "classcat"
import { useTheme } from "next-themes";

export const DisconnectWallet = () => {
const { disconnect } = useDisconnect();
const { systemTheme, theme } = useTheme();
const currentTheme = theme === "system" ? systemTheme : theme;
const isDark = currentTheme === "dark";
const { toggleSidebar } = useSidebar();

const handleClick = () => {
toggleSidebar()
disconnect()
}

return (
<button
onClick={handleClick}
className={cc([
"flex gap-2 justify-center items-center",
isDark ? "text-[#DDF23D]" : "text-[#AABE13]",
])}
>
<PowerIcon />
<h3 className="text-sm">Disconnect</h3>
</button>
);
};
Loading
Loading