mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-11 07:56:50 +02:00
fix: replace 'any' types with proper IAccount<ISigner, unknown, unknown>
- Updated AccountCard component to use IAccount<ISigner, unknown, unknown> - Updated switchAccount function to use proper type - Added ISigner import to both files - Maintains type safety while supporting all account types
This commit is contained in:
@@ -9,12 +9,14 @@ import { Button } from "@/components/ui/button";
|
||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import Nip05 from "@/components/nostr/nip05";
|
||||
import type { IAccount } from "applesauce-accounts";
|
||||
import type { ISigner } from "applesauce-signers";
|
||||
|
||||
function AccountCard({
|
||||
account,
|
||||
isActive,
|
||||
}: {
|
||||
account: any;
|
||||
account: IAccount<ISigner, unknown, unknown>;
|
||||
isActive: boolean;
|
||||
}) {
|
||||
const profile = useProfile(account.pubkey);
|
||||
|
||||
@@ -23,6 +23,7 @@ import { RelayLink } from "./RelayLink";
|
||||
import SettingsDialog from "@/components/SettingsDialog";
|
||||
import { useState } from "react";
|
||||
import type { IAccount } from "applesauce-accounts";
|
||||
import type { ISigner } from "applesauce-signers";
|
||||
|
||||
function UserAvatar({ pubkey }: { pubkey: string }) {
|
||||
const profile = useProfile(pubkey);
|
||||
@@ -85,7 +86,7 @@ export default function UserMenu() {
|
||||
}
|
||||
}
|
||||
|
||||
function switchAccount(targetAccount: IAccount<any, any, any>) {
|
||||
function switchAccount(targetAccount: IAccount<ISigner, unknown, unknown>) {
|
||||
accounts.setActive(targetAccount.id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user