chore: remove solana wallet stack

This commit is contained in:
2026-04-22 13:32:14 -04:00
parent 8ec91acc25
commit 4bfcbb6b7e
8 changed files with 104 additions and 744 deletions
+1 -3
View File
@@ -46,8 +46,7 @@ interface User {
email: string | null;
isAdmin: boolean;
isActive: boolean;
walletAddress: string | null;
totalEarned: number;
totalEarned: number;
totalSpent: number;
watchTimeMinutes: number;
createdAt: string;
@@ -256,7 +255,6 @@ export default function AdminPage() {
<div className="flex gap-2 mt-1">
{u.isAdmin && <Badge variant="default">Admin</Badge>}
{!u.isActive && <Badge variant="destructive">Inactive</Badge>}
{u.walletAddress && <Badge variant="secondary">Wallet</Badge>}
</div>
</div>
<div className="text-right">
+4 -9
View File
@@ -8,8 +8,7 @@ import {
Film,
History,
TrendingDown,
TrendingUp,
Wallet,
TrendingUp
} from "lucide-react";
import { useRouter } from "next/navigation";
import { useEffect, useState } from "react";
@@ -24,7 +23,7 @@ import {
CardTitle,
} from "@/components/ui/card";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { overseerApi, transactionApi, walletApi } from "@/lib/api";
import { overseerApi, transactionApi } from "@/lib/api";
import { useSocket } from "@/lib/socket";
import { useStore } from "@/lib/store";
import { formatNumber, truncateAddress } from "@/lib/utils";
@@ -50,9 +49,7 @@ export default function DashboardPage() {
const router = useRouter();
const { user, isAuthenticated, logout } = useStore();
const [wallet, setWallet] = useState<WalletData | null>(null);
const [requestCosts, setRequestCosts] = useState({ movie: 100, tv: 200 });
const [isCreateModalOpen, setIsCreateModalOpen] = useState(false);
const [isSearchModalOpen, setIsSearchModalOpen] = useState(false);
const [requestCosts, setRequestCosts] = useState({ movie: 100, tv: 200 }); const [isSearchModalOpen, setIsSearchModalOpen] = useState(false);
const [isLoading, setIsLoading] = useState(true);
const socket = useSocket();
@@ -138,9 +135,7 @@ export default function DashboardPage() {
)}
</div>
<div className="flex items-center gap-4">
<div className="wallet-adapter-custom-wrapper hidden md:block">
<WalletMultiButton className="!h-9 !px-4 !text-sm !rounded-md !bg-secondary !text-secondary-foreground hover:!bg-secondary/80" />
</div>
<div className="wallet-adapter-custom-wrapper hidden md:block"> </div>
<Button variant="ghost" onClick={logout}>
Sign Out
</Button>
+22 -23
View File
@@ -1,32 +1,31 @@
import { create } from 'zustand';
import { create } from "zustand";
export interface User {
id: string;
plexId: string;
plexUsername: string;
email: string | null;
isAdmin: boolean;
walletAddress: string | null;
totalEarned: number;
totalSpent: number;
id: string;
plexId: string;
plexUsername: string;
email: string | null;
isAdmin: boolean;
totalEarned: number;
totalSpent: number;
}
interface AppState {
user: User | null;
token: string | null;
isAuthenticated: boolean;
setUser: (user: User | null) => void;
setToken: (token: string | null) => void;
logout: () => void;
user: User | null;
token: string | null;
isAuthenticated: boolean;
setUser: (user: User | null) => void;
setToken: (token: string | null) => void;
logout: () => void;
}
export const useStore = create<AppState>()((set) => ({
user: null,
token: null,
isAuthenticated: false,
setUser: (user) => set({ user, isAuthenticated: !!user }),
setToken: (token) => set({ token }),
logout: () => {
set({ user: null, token: null, isAuthenticated: false });
},
user: null,
token: null,
isAuthenticated: false,
setUser: (user) => set({ user, isAuthenticated: !!user }),
setToken: (token) => set({ token }),
logout: () => {
set({ user: null, token: null, isAuthenticated: false });
},
}));