chore: fix some eslint warnings

This commit is contained in:
2024-01-04 10:43:45 +00:00
parent 2a2c713486
commit 13f4ec3f30
14 changed files with 36 additions and 36 deletions

View File

@ -17,7 +17,7 @@ const getExtra = () => {
if (isChristmas()) return <span title="Merry Christmas!">🎄</span>;
};
export function LogoHeader({ showText = false }) {
export function LogoHeader({ showText = false }: { showText: boolean }) {
const { subscriptions } = useLogin();
const currentSubscription = getCurrentSubscription(subscriptions);

View File

@ -113,7 +113,7 @@ const WalletBalance = () => {
);
};
export default function NavSidebar({ narrow = false }) {
export default function NavSidebar({ narrow = false }: { narrow: boolean }) {
const { publicKey, subscriptions, readonly } = useLogin(s => ({
publicKey: s.publicKey,
subscriptions: s.subscriptions,
@ -147,7 +147,7 @@ export default function NavSidebar({ narrow = false }) {
{ "xl:items-start": !narrow, "xl:gap-2": !narrow },
"gap-1 flex flex-col items-center text-lg font-bold",
)}>
<WalletBalance narrow={narrow} />
<WalletBalance />
{MENU_ITEMS.filter(a => {
if ((CONFIG.hideFromNavbar ?? []).includes(a.link)) {
return false;

View File

@ -67,7 +67,7 @@ export default function Index() {
);
}
function StalkerModal({ id }) {
function StalkerModal({ id }: { id: string }) {
return (
<div className="stalker" onClick={() => LoginStore.removeSession(id)}>
<CloseButton />

View File

@ -18,7 +18,7 @@ export default function DmWindow({ id }: { id: string }) {
return (
<div className="flex -space-x-5 mb-2.5">
{chat.participants.map(v => (
<ProfileImage pubkey={v.id} showUsername={false} />
<ProfileImage key={v.id} pubkey={v.id} showUsername={false} />
))}
{chat.title ?? <FormattedMessage defaultMessage="Secret Group Chat" id="+Vxixo" />}
</div>

View File

@ -54,7 +54,7 @@ export default function MessagesPage() {
return (
<div className="flex items-center grow pfp-overlap">
{cx.participants.map(v => (
<ProfileImage pubkey={v.id} link="" showUsername={false} profile={v.profile} />
<ProfileImage key={v.id} pubkey={v.id} link="" showUsername={false} profile={v.profile} />
))}
{cx.title ?? <FormattedMessage defaultMessage="Group Chat" id="eXT2QQ" />}
</div>

View File

@ -38,7 +38,7 @@ export function ZapsProfileTab({ id }: { id: HexKey }) {
<FormattedMessage {...messages.Sats} values={{ n: formatShort(zapsTotal) }} />
</h2>
{zaps.map(z => (
<ZapElement showZapped={false} zap={z} />
<ZapElement key={z.id} showZapped={false} zap={z} />
))}
</>
);

View File

@ -105,7 +105,7 @@ export default function WalletPage(props: { showHistory: boolean }) {
<div>
<select className="w-max" onChange={e => Wallets.switch(e.target.value)} value={walletState.config?.id}>
{Wallets.list().map(a => {
return <option value={a.id}>{a.info.alias}</option>;
return <option value={a.id} key={a.id}>{a.info.alias}</option>;
})}
</select>
</div>