diff --git a/src/routes/dashboard/index.tsx b/src/routes/dashboard/index.tsx index 8a90cb1..d5c633c 100644 --- a/src/routes/dashboard/index.tsx +++ b/src/routes/dashboard/index.tsx @@ -1,4 +1,4 @@ -import { createFileRoute } from "@tanstack/react-router"; +import { createFileRoute, useNavigate } from "@tanstack/react-router"; import { Files } from "../../components/Files/Files.tsx"; import { WelcomeCard } from "../../components/Welcome/WelcomeCard.tsx"; import { Download } from "../../components/Download/Download.tsx"; @@ -26,7 +26,7 @@ export const Route = createFileRoute("/dashboard/")({ function Dashboard() { const username = WebStorage.onBoarding.getDisplayName(); - + const naviguate = useNavigate({ from: window.location.pathname }); const emoji = WebStorage.onBoarding.getEmoji(); return ( @@ -47,7 +47,8 @@ function Dashboard() { className="card--main" title="Connected Account" buttonLabel="Add Wallet" - buttonIcon={() => }> + buttonIcon={() => } + buttonAction={() => naviguate({ to: "/dashboard/availabilities" })}> @@ -55,7 +56,8 @@ function Dashboard() { } title="Storage" - buttonLabel="Details"> + buttonLabel="Details" + buttonAction={() => naviguate({ to: "/dashboard/peers" })}>