chore: sonar warnings

This commit is contained in:
Zamitto 2024-12-23 19:23:09 -03:00
parent aab4197156
commit 549ea750c0
3 changed files with 10 additions and 7 deletions

View File

@ -18,8 +18,12 @@ export function AchievementList({ achievements }: AchievementListProps) {
return (
<ul className={styles.list}>
{achievements.map((achievement, index) => (
<li key={index} className={styles.listItem} style={{ display: "flex" }}>
{achievements.map((achievement) => (
<li
key={achievement.name}
className={styles.listItem}
style={{ display: "flex" }}
>
<img
className={styles.listItemImage({
unlocked: achievement.unlocked,
@ -72,7 +76,7 @@ export function AchievementList({ achievements }: AchievementListProps) {
<p style={{ fontSize: "1.1em" }}>???</p>
</button>
)}
{achievement.unlockTime && (
{achievement.unlockTime != null && (
<div
title={t("unlocked_at", {
date: formatDateTime(achievement.unlockTime),

View File

@ -154,7 +154,7 @@ export function Sidebar() {
<div>
<p>{achievement.displayName}</p>
<small>
{achievement.unlockTime &&
{achievement.unlockTime != null &&
formatDateTime(achievement.unlockTime)}
</small>
</div>
@ -203,7 +203,7 @@ export function Sidebar() {
<div>
<p>{achievement.displayName}</p>
<small>
{achievement.unlockTime &&
{achievement.unlockTime != null &&
formatDateTime(achievement.unlockTime)}
</small>
</div>

View File

@ -13,8 +13,7 @@ import { settingsContext } from "@renderer/context";
import { downloadSourcesTable } from "@renderer/dexie";
import { downloadSourcesWorker } from "@renderer/workers";
import { useNavigate } from "react-router-dom";
import { clearFilters } from "@renderer/features";
import { setFilters } from "@renderer/features";
import { setFilters, clearFilters } from "@renderer/features";
export function SettingsDownloadSources() {
const [showAddDownloadSourceModal, setShowAddDownloadSourceModal] =