Skip to content

Commit

Permalink
fixed tiny bugs on address change, and design on profile page
Browse files Browse the repository at this point in the history
  • Loading branch information
alimaktabi committed Feb 15, 2024
1 parent 5b440c0 commit 1d4fa92
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/profile/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const Profile = async () => {
</div>

<div className="my-10 py-10 relative">
<div className="flex flex-wrap justify-between overflow-hidden opacity-20 gap-10">
<div className="flex select-none flex-wrap justify-between overflow-hidden opacity-20 gap-10">
<SeasonMission
className="opacity-20"
title="Gnosis Explorer"
Expand Down
18 changes: 13 additions & 5 deletions components/containers/modals/ConnectWalletModal/unknownWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,26 @@
import Icon from "@/components/ui/Icon";
import { shortenAddress } from "@/utils";
import { useWalletAccount } from "@/utils/wallet";
import {
ClaimButton,
WhiteOutlinedButton,
} from "@/components/ui/Button/button";
import { FC } from "react";
import { ClaimButton } from "@/components/ui/Button/button";
import { FC, useEffect, useRef } from "react";
import { WalletState } from ".";
import { Address } from "viem";

const UnknownWalletBody: FC<{
setWalletState: (state: WalletState) => void;
}> = ({ setWalletState }) => {
const { address } = useWalletAccount();

const previousAddressRef = useRef<Address | null>();

useEffect(() => {
if (!address) return;
if (!previousAddressRef.current) previousAddressRef.current = address;

if (address !== previousAddressRef.current)
setWalletState(WalletState.Prompt);
}, [address, setWalletState]);

return (
<div className="text-center">
<Icon
Expand Down

0 comments on commit 1d4fa92

Please sign in to comment.