Skip to content

Commit

Permalink
fix: admin btn
Browse files Browse the repository at this point in the history
  • Loading branch information
yarre-uk committed Jan 16, 2025
1 parent 65dffea commit 2651c87
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/components/pages/home/hero.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
import { useWallet } from '@solana/wallet-adapter-react';

import { AdminBtn } from '@/components/common/AdminBtn';
import { GoToTwitterBtn } from '@/components/common/GoToTwitterBtn';
import { PredictFutureBtn } from '@/components/common/PredictFutureBtn';
import { OwnerAddress } from '@/constants/addresses';
import { network } from '@/lib/solana';

export const Hero = () => {
const { publicKey } = useWallet();

return (
<div className="relative flex min-h-[812px] flex-col items-center justify-between pb-[52px] pt-20 md:min-h-[865px] md:pb-[72px] md:pt-20">
<h1 className="text-center font-bona-nova-sc text-[40px] md:text-[60px]">TarotSol AI</h1>
<div className="flex flex-col gap-6 md:flex-row md:gap-10">
<GoToTwitterBtn />
<PredictFutureBtn />
<AdminBtn />

{publicKey?.equals(OwnerAddress[network]) && <AdminBtn />}
</div>
<img
src="/images/landing/hero-bg.webp"
Expand Down
2 changes: 0 additions & 2 deletions src/lib/solana/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import { env } from '@/env';
export const network =
env.VITE_PUBLIC_NETWORKS_MODE === 'mainnet' ? WalletAdapterNetwork.Mainnet : WalletAdapterNetwork.Devnet;

console.log('wallets', network);

export const endpoint = env.VITE_PUBLIC_SOLANA_RPC ?? clusterApiUrl(network);

export const wallets = [new PhantomWalletAdapter(), new SolflareWalletAdapter()];
Expand Down

0 comments on commit 2651c87

Please sign in to comment.