Skip to content

Commit 6cacf67

Browse files
committed
fix(web): type fix and wagmi hook
1 parent b36be72 commit 6cacf67

File tree

4 files changed

+1498
-1661
lines changed

4 files changed

+1498
-1661
lines changed

web/netlify.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,3 @@ YARN_ENABLE_GLOBAL_CACHE = "true"
99

1010
[functions]
1111
directory = "web/netlify/functions/"
12-
13-
[dev]
14-
framework = "parcel"

web/src/components/ConnectWallet/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const ConnectWallet: React.FC = () => {
3737
const chainId = useChainId();
3838
const { isConnected } = useAccount();
3939
if (isConnected) {
40-
if (chain && chain.id !== DEFAULT_CHAIN) {
40+
if (chainId !== DEFAULT_CHAIN) {
4141
return <SwitchChainButton />;
4242
} else return <AccountDisplay />;
4343
} else return <ConnectButton />;

web/src/layout/Header/navbar/Explore.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import styled, { css } from "styled-components";
33
import { landscapeStyle } from "styles/landscapeStyle";
4-
import { Link, useLocation } from "react-router-dom";
4+
import { Link, LinkProps, useLocation } from "react-router-dom";
55
import { useOpenContext } from "../MobileHeader";
66

77
const Container = styled.div`
@@ -33,12 +33,16 @@ const Title = styled.h1`
3333
)};
3434
`;
3535

36-
const StyledLink = styled(Link)<{ isActive: boolean }>`
36+
interface StyledLinkProps extends LinkProps {
37+
isActive: boolean;
38+
}
39+
40+
const StyledLink = styled(({ isActive, ...props }: StyledLinkProps) => <Link {...props} />)`
3741
color: ${({ theme }) => theme.primaryText};
3842
text-decoration: none;
3943
font-size: 16px;
4044
41-
font-weight: ${({ isActive }) => (isActive ? "600" : "normal")};
45+
font-weight: ${({ isActive }: StyledLinkProps) => (isActive ? "600" : "normal")};
4246
4347
${landscapeStyle(
4448
() => css`

0 commit comments

Comments
 (0)