mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
fix sonar warnings
This commit is contained in:
@@ -32,7 +32,11 @@ const useStyles = tss.create(({ theme }) => ({
|
||||
},
|
||||
}))
|
||||
|
||||
export function ErrorPage(props: { error: Error }) {
|
||||
export function ErrorPage(
|
||||
props: Readonly<{
|
||||
error: Error
|
||||
}>
|
||||
) {
|
||||
const { classes } = useStyles()
|
||||
|
||||
return (
|
||||
|
||||
@@ -12,7 +12,8 @@ import { Loader } from "@/components/Loader"
|
||||
import { RelativeDate } from "@/components/RelativeDate"
|
||||
|
||||
function BooleanIcon({ value }: { value: boolean }) {
|
||||
return value ? <TbCheck size={18} /> : <TbX size={18} />
|
||||
const icon = value ? TbCheck : TbX
|
||||
return icon({ size: 18 })
|
||||
}
|
||||
|
||||
export function AdminUsersPage() {
|
||||
@@ -56,7 +57,9 @@ export function AdminUsersPage() {
|
||||
),
|
||||
labels: { confirm: <Trans>Confirm</Trans>, cancel: <Trans>Cancel</Trans> },
|
||||
confirmProps: { color: "red" },
|
||||
onConfirm: async () => await deleteUser.execute({ id: user.id }),
|
||||
onConfirm: () => {
|
||||
deleteUser.execute({ id: user.id })
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,13 @@ const useStyles = tss.create(() => ({
|
||||
},
|
||||
}))
|
||||
|
||||
function Section(props: { title: React.ReactNode; icon: React.ReactNode; children: React.ReactNode }) {
|
||||
function Section(
|
||||
props: Readonly<{
|
||||
title: React.ReactNode
|
||||
icon: React.ReactNode
|
||||
children: React.ReactNode
|
||||
}>
|
||||
) {
|
||||
const { classes } = useStyles()
|
||||
return (
|
||||
<Box my="xl">
|
||||
|
||||
@@ -66,7 +66,9 @@ export function CategoryDetailsPage() {
|
||||
),
|
||||
labels: { confirm: <Trans>Confirm</Trans>, cancel: <Trans>Cancel</Trans> },
|
||||
confirmProps: { color: "red" },
|
||||
onConfirm: async () => await deleteCategory.execute({ id: +id }),
|
||||
onConfirm: () => {
|
||||
deleteCategory.execute({ id: +id })
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ function FilteringExpressionDescription() {
|
||||
<a href="https://commons.apache.org/proper/commons-jexl/reference/syntax.html" target="_blank" rel="noreferrer">
|
||||
here
|
||||
</a>
|
||||
.
|
||||
<span>.</span>
|
||||
</Trans>
|
||||
</div>
|
||||
</div>
|
||||
@@ -86,7 +86,9 @@ export function FeedDetailsPage() {
|
||||
),
|
||||
labels: { confirm: <Trans>Confirm</Trans>, cancel: <Trans>Cancel</Trans> },
|
||||
confirmProps: { color: "red" },
|
||||
onConfirm: async () => await unsubscribe.execute({ id: +id }),
|
||||
onConfirm: () => {
|
||||
unsubscribe.execute({ id: +id })
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ const useStyles = tss.create(() => ({
|
||||
},
|
||||
}))
|
||||
|
||||
export function FeedEntriesPage(props: FeedEntriesPageProps) {
|
||||
export function FeedEntriesPage(props: Readonly<FeedEntriesPageProps>) {
|
||||
const { classes } = useStyles()
|
||||
const location = useLocation()
|
||||
const { id = Constants.categories.all.id } = useParams()
|
||||
|
||||
@@ -68,7 +68,7 @@ const useStyles = tss
|
||||
}
|
||||
})
|
||||
|
||||
export default function Layout(props: LayoutProps) {
|
||||
export default function Layout(props: Readonly<LayoutProps>) {
|
||||
const theme = useMantineTheme()
|
||||
const mobile = useMobile()
|
||||
const { isBrowserExtensionPopup } = useBrowserExtension()
|
||||
@@ -206,7 +206,6 @@ export default function Layout(props: LayoutProps) {
|
||||
grid={[30, 30]}
|
||||
onDrag={(_e, data) => {
|
||||
dispatch(setSidebarWidth(data.x))
|
||||
return
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
|
||||
Reference in New Issue
Block a user