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

chore: added new banner #200

Closed
wants to merge 33 commits into from
Closed
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
8f70036
chore: formatted tvl data
hemantwasthere Oct 5, 2024
8fd4212
Merge branch 'dev' of https://github.com/hemantwasthere/starkfarm-cli…
hemantwasthere Oct 5, 2024
d929f2f
fix: added dollar sign before tvl data
hemantwasthere Oct 5, 2024
15a7884
fix: removed dollar sign : )
hemantwasthere Oct 5, 2024
a584239
fix: undefined tvl formatting issue
akiraonstarknet Oct 5, 2024
2ba8923
fix: compile error in TVL
hemantwasthere Oct 5, 2024
b0bdfc0
Merge branch 'dev' of https://github.com/hemantwasthere/starkfarm-cli…
hemantwasthere Oct 23, 2024
4d2754a
chore: raffle implementation
hemantwasthere Oct 25, 2024
1741d4d
Merge pull request #1 from hemantwasthere/feat/raffle
hemantwasthere Oct 25, 2024
93471cd
chore: deploy trigger
hemantwasthere Oct 25, 2024
8c0bfa5
chore: updated cron expression
hemantwasthere Oct 25, 2024
478fddf
chore: updated cron expression
hemantwasthere Oct 25, 2024
a5b131f
chore: updated cron expression
hemantwasthere Oct 25, 2024
4c15c9a
chore: update route method
hemantwasthere Oct 25, 2024
b8bb738
chore: update route logic
hemantwasthere Oct 25, 2024
31e651d
chore: updated cron expression
hemantwasthere Oct 25, 2024
898849c
chore: updated cron expression
hemantwasthere Oct 25, 2024
1a526da
chore: code refactor
hemantwasthere Oct 28, 2024
050619b
chore: updated lucky winner route
hemantwasthere Oct 28, 2024
78662f0
fix: added cron secret
hemantwasthere Oct 28, 2024
0dd8b16
chore: updated lucky winner route.ts
hemantwasthere Oct 29, 2024
b596f2a
chore: ui updates on raffle page
hemantwasthere Nov 1, 2024
e896679
fix: bugs and ui tweaks
hemantwasthere Nov 1, 2024
8775a62
chore: text update
hemantwasthere Nov 1, 2024
86cd737
fix: ekubo logo
hemantwasthere Nov 14, 2024
380c56c
Merge branch 'dev' of https://github.com/hemantwasthere/starkfarm-cli…
hemantwasthere Nov 14, 2024
20cfa93
Merge branch 'strkfarm:dev' into dev
hemantwasthere Nov 24, 2024
0053d70
chore: update home page banner
hemantwasthere Nov 24, 2024
c6445d6
Merge branch 'dev' of https://github.com/hemantwasthere/starkfarm-cli…
hemantwasthere Dec 26, 2024
3429012
chore: added new banner
hemantwasthere Dec 30, 2024
f88d2bc
chore: update banner
hemantwasthere Dec 30, 2024
1222811
Merge branch 'strkfarm:dev' into dev
hemantwasthere Jan 1, 2025
6c607ff
support: keplr wallet
hemantwasthere Jan 1, 2025
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
10 changes: 9 additions & 1 deletion src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@
import mixpanel from 'mixpanel-browser';
import { useEffect, useMemo } from 'react';
import { isMobile } from 'react-device-detect';
import { constants } from 'starknet';
import {
ArgentMobileConnector,
isInArgentMobileAppBrowser,
} from 'starknetkit/argentMobile';
import { WebWalletConnector } from 'starknetkit/webwallet';
import TncModal from './TncModal';
import { constants } from 'starknet';

export function getConnectors(isMobile: boolean) {
const mobileConnector = ArgentMobileConnector.init({
Expand All @@ -85,6 +85,13 @@
},
});

const keplrConnector = new InjectedConnector({
options: {
id: 'keplr',
name: 'Keplr',
},
});

const webWalletConnector = new WebWalletConnector({
url: 'https://web.argent.xyz',
}) as StarknetkitConnector;
Expand All @@ -97,6 +104,7 @@
return [
argentXConnector,
braavosConnector,
keplrConnector,
mobileConnector,
webWalletConnector,
];
Expand All @@ -109,7 +117,7 @@

export default function Navbar(props: NavbarProps) {
const { address, connector, account } = useAccount();
const { disconnectAsync } = useDisconnect();

Check notice on line 120 in src/components/Navbar.tsx

View check run for this annotation

codefactor.io / CodeFactor

src/components/Navbar.tsx#L120

'lastWallet' is assigned a value but never used. Allowed unused vars must match /^_/u. (unused-imports/no-unused-vars)
const setAddress = useSetAtom(addressAtom);
const { data: starkProfile } = useStarkProfile({
address,
Expand All @@ -133,7 +141,7 @@
modalMode: 'canAsk',
modalTheme: 'dark',
webWalletUrl: 'https://web.argent.xyz',
argentMobileOptions: {

Check notice on line 144 in src/components/Navbar.tsx

View check run for this annotation

codefactor.io / CodeFactor

src/components/Navbar.tsx#L144

React Hook useMemo has an unnecessary dependency: 'isMobile'. Either exclude it or remove the dependency array. Outer scope values like 'isMobile' aren't valid dependencies because mutating them doesn't re-render the component. (react-hooks/exhaustive-deps)
dappName: 'STRKFarm',
chainId: constants.NetworkName.SN_MAIN,
url: getEndpoint(),
Expand All @@ -153,7 +161,7 @@
} catch (error) {
console.error('connectWallet error', error);
}
}

Check notice on line 164 in src/components/Navbar.tsx

View check run for this annotation

codefactor.io / CodeFactor

src/components/Navbar.tsx#L164

React Hook useEffect has missing dependencies: 'connectWallet' and 'connectorConfig'. Either include them or remove the dependency array. (react-hooks/exhaustive-deps)

useEffect(() => {
const config = connectorConfig;
Expand All @@ -179,13 +187,13 @@
}
})();
}, [address]);

Check notice on line 190 in src/components/Navbar.tsx

View check run for this annotation

codefactor.io / CodeFactor

src/components/Navbar.tsx#L190

React Hook useEffect has a missing dependency: 'setLastWallet'. Either include it or remove the dependency array. (react-hooks/exhaustive-deps)
// Set last wallet when a new wallet is connected
useEffect(() => {
console.log('lastWallet connector', connector?.name);
if (connector) {
const name: string = connector.name;
setLastWallet(name);

Check notice on line 196 in src/components/Navbar.tsx

View check run for this annotation

codefactor.io / CodeFactor

src/components/Navbar.tsx#L196

React Hook useEffect has a missing dependency: 'setAddress'. Either include it or remove the dependency array. (react-hooks/exhaustive-deps)
}
}, [connector]);

Expand Down Expand Up @@ -424,7 +432,7 @@
</Center>
) : (
'Connect'
)}

Check notice on line 435 in src/components/Navbar.tsx

View check run for this annotation

codefactor.io / CodeFactor

src/components/Navbar.tsx#L435

'data' is defined but never used. Allowed unused args must match /^_/u. (unused-imports/no-unused-vars)
</Center>
</MenuButton>
<MenuList {...MyMenuListProps}>
Expand Down
Loading