fix: wallet api auth after solana purge
This commit is contained in:
@@ -11,7 +11,7 @@ import {
|
|||||||
CardTitle,
|
CardTitle,
|
||||||
} from "@/components/ui/card";
|
} from "@/components/ui/card";
|
||||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||||
import { overseerApi } from "@/lib/api";
|
import { api, overseerApi } from "@/lib/api";
|
||||||
import { useSocket } from "@/lib/socket";
|
import { useSocket } from "@/lib/socket";
|
||||||
import { useStore } from "@/lib/store";
|
import { useStore } from "@/lib/store";
|
||||||
import { formatNumber } from "@/lib/utils";
|
import { formatNumber } from "@/lib/utils";
|
||||||
@@ -57,10 +57,10 @@ export default function DashboardPage() {
|
|||||||
const loadData = async () => {
|
const loadData = async () => {
|
||||||
try {
|
try {
|
||||||
const [walletRes, costsRes] = await Promise.all([
|
const [walletRes, costsRes] = await Promise.all([
|
||||||
fetch("/api/wallet").then((r) => r.json()),
|
api.get("/wallet"),
|
||||||
overseerApi.getCosts(),
|
overseerApi.getCosts(),
|
||||||
]);
|
]);
|
||||||
setWallet(walletRes);
|
setWallet(walletRes.data);
|
||||||
setRequestCosts(costsRes.data);
|
setRequestCosts(costsRes.data);
|
||||||
} catch {
|
} catch {
|
||||||
toast.error("Failed to load dashboard");
|
toast.error("Failed to load dashboard");
|
||||||
|
|||||||
Reference in New Issue
Block a user