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: the layout shift when hovering over on connect wallet button #27

Merged
merged 1 commit into from
May 9, 2024
Merged
Changes from all commits
Commits
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
28 changes: 14 additions & 14 deletions src/components/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
import tg from '@/assets/tg.svg';
import CONSTANTS from '@/constants';
import { addressAtom } from '@/store/claims.atoms';
import { WalletName, lastWalletAtom } from '@/store/utils.atoms';
import {
MyMenuItemProps,
MyMenuListProps,
capitalize,
shortAddress,
} from '@/utils';
import { ChevronDownIcon } from '@chakra-ui/icons';
import {
Avatar,
Box,
Expand All @@ -15,28 +26,17 @@
Text,
} from '@chakra-ui/react';
import { useAccount, useConnect, useDisconnect } from '@starknet-react/core';
import { ChevronDownIcon } from '@chakra-ui/icons';
import tg from '@/assets/tg.svg';
import CONSTANTS from '@/constants';
import { useEffect } from 'react';
import { useAtom, useSetAtom } from 'jotai';
import { addressAtom } from '@/store/claims.atoms';
import {
capitalize,
shortAddress,
MyMenuListProps,
MyMenuItemProps,
} from '@/utils';
import { getStarknet } from 'get-starknet-core';
import { WalletName, lastWalletAtom } from '@/store/utils.atoms';
import { useAtom, useSetAtom } from 'jotai';
import { useEffect } from 'react';

export default function Navbar() {
const { address, chainId, status, connector } = useAccount();

Check warning on line 34 in src/components/Navbar.tsx

View workflow job for this annotation

GitHub Actions / Performs linting, formatting on the application

'chainId' is assigned a value but never used. Allowed unused vars must match /^_/u
const { connect, connectors } = useConnect();
const { disconnect, disconnectAsync } = useDisconnect();

Check warning on line 36 in src/components/Navbar.tsx

View workflow job for this annotation

GitHub Actions / Performs linting, formatting on the application

'disconnect' is assigned a value but never used. Allowed unused vars must match /^_/u
const setAddress = useSetAtom(addressAtom);

Check warning on line 37 in src/components/Navbar.tsx

View workflow job for this annotation

GitHub Actions / Performs linting, formatting on the application

'setAddress' is assigned a value but never used. Allowed unused vars must match /^_/u
const [lastWallet, setLastWallet] = useAtom(lastWalletAtom);
const getStarknetResult = getStarknet();

Check warning on line 39 in src/components/Navbar.tsx

View workflow job for this annotation

GitHub Actions / Performs linting, formatting on the application

'getStarknetResult' is assigned a value but never used. Allowed unused vars must match /^_/u

useEffect(() => {
console.log('lastWallet', lastWallet);
Expand Down Expand Up @@ -175,6 +175,7 @@
bgColor={'purple'}
color="white"
borderColor={'purple'}
borderWidth="1px"
_hover={{
bg: 'bg',
borderColor: 'purple',
Expand All @@ -184,7 +185,6 @@
_active={{
bg: 'bg',
borderColor: 'purple',
borderWidth: '1px',
color: 'purple',
}}
marginLeft={'10px'}
Expand Down
Loading