Skip to content

Commit

Permalink
final
Browse files Browse the repository at this point in the history
  • Loading branch information
utkarshdagoat committed Jun 28, 2024
1 parent d5377c9 commit 8ec1651
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ui/src/components/dashboard/header/dashboard-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { ChainInfo } from "@/lib/chain";
import { useToast } from "@/components/ui/use-toast";
import { Window as KeplrWindow } from "@keplr-wallet/types";
import { useEffect } from "react";
import { useNavigate } from "react-router-dom";

declare global {
// eslint-disable-next-line @typescript-eslint/no-empty-interface
Expand All @@ -16,6 +17,7 @@ export default function DashboardHeader() {
const { user } = useUserStore();
const { walletAddress, setWalletAddress } = useWalletStore();
const { toast } = useToast();
const navigate = useNavigate();

const connectWalletHandle = async () => {
const chainId = ChainInfo.chainId;
Expand Down Expand Up @@ -48,6 +50,7 @@ export default function DashboardHeader() {
</h1>
<div className="flex gap-6">
<Button onClick={connectWalletHandle}>{walletAddress === null ? "Connect Wallet" : walletAddress}</Button>
<Button onClick={()=>navigate("/governance")}>Go To Governance</Button>
<GetLoan />
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions ui/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import './index.css'
import { Toaster } from '@/components/ui/toaster.tsx'

ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<>
<App />
<Toaster />
</React.StrictMode>,
</>,
)

0 comments on commit 8ec1651

Please sign in to comment.