import { WalletIcon } from "@heroicons/react/24/outline"; import { useWalletModal } from "@solana/wallet-adapter-react-ui"; import clsx from "clsx"; import Image, { type StaticImageData } from "next/image"; import { type ReactNode, type ComponentType, type SVGProps, type ComponentProps, useCallback, useState, useRef, useEffect, } from "react"; import { Tabs, TabList, Tab, TabPanel } from "react-aria-components"; import governance from "./governance.png"; import Info from "./info.svg"; import ObtainRewards from "./obtain-rewards.svg"; import ois from "./ois.png"; import Safebox from "./safebox.svg"; import SelectPublishers from "./select-publishers.svg"; import TokenWarmup from "./token-warmup.svg"; import { Button } from "../Button"; export const NoWalletHome = () => { const modal = useWalletModal(); const showModal = useCallback(() => { modal.setVisible(true); }, [modal]); const lastTab = useRef< Exclude["selectedKey"], undefined> >(TabId.IntegrityStaking); const [tab, setTab] = useState< Exclude["selectedKey"], undefined> >(TabId.IntegrityStaking); const scrollTarget = useRef(null); useEffect(() => { if (scrollTarget.current && tab !== lastTab.current) { lastTab.current = tab; scrollTarget.current.scrollIntoView({ behavior: "smooth" }); } }, [tab]); return (
WELCOME
TO THE PYTH STAKING
DASHBOARD

Choose Your Journey

You can participate in both programs.

{tab === TabId.IntegrityStaking ? ( <> Secure the Oracle
to Earn Rewards ) : ( <> Gain Voting Power
for Governance )}
Secure the Oracle
to Earn Rewards } > Oracle Integrity Staking
Gain Voting Power
for Governance } > Pyth Governance

Get Started

Connect your wallet to get started with either Oracle Integrity Staking or Pyth Governance.

You can stake your PYTH tokens in either or both the Oracle Integrity Staking and Pyth Governance programs.
); }; type ProgramTabProps = ComponentProps & { description: ReactNode; children: ReactNode; image: StaticImageData; }; const ProgramTab = ({ description, className, children, image, ...props }: ProgramTabProps) => (
{description}
{children}
); type ProgramPanelProps = ComponentProps & { header: ReactNode; eyebrow: ReactNode; steps: { icon: ComponentType>; title: ReactNode; body: ReactNode; }[]; }; const ProgramPanel = ({ header, eyebrow, steps, className, ...props }: ProgramPanelProps) => (
{eyebrow}

{header}

    {steps.map(({ icon: Icon, title, body }, i) => (
  1. STEP {i + 1}

    {title}

    {body}

  2. ))}
); enum TabId { IntegrityStaking = "integrity-staking", Governance = "governance", }