From db5d3ff7c0062257f7096df906bdcee84a98c17e Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Sat, 9 Dec 2023 14:16:44 +0100 Subject: [PATCH] Remove "directLink" prop (#488) Is not required anymore since "Link" of react-router-dom is a "" element now anyway. It also caused the following warning "react-dom.development.js:86 Warning: React does not recognize the `directLink` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `directlink` instead. If you accidentally passed it from a parent component, remove it from the DOM element" --- src/components/util/ListItemLink.tsx | 11 +---------- src/screens/settings/About.tsx | 6 +++--- src/screens/settings/Backup.tsx | 2 +- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/components/util/ListItemLink.tsx b/src/components/util/ListItemLink.tsx index d5903d21b5..f968047d36 100644 --- a/src/components/util/ListItemLink.tsx +++ b/src/components/util/ListItemLink.tsx @@ -9,15 +9,6 @@ import { Link } from 'react-router-dom'; import { ListItemButton, ListItemButtonProps } from '@mui/material'; -export function ListItemLink(props: ListItemButtonProps) { - const { directLink, to } = props; - if (directLink) { - if (typeof to !== 'string') { - throw new Error('ListItemLink: "to" has to be a string in case it is a directLink'); - } - - return ; - } - +export function ListItemLink(props: ListItemButtonProps) { return ; } diff --git a/src/screens/settings/About.tsx b/src/screens/settings/About.tsx index c33a2a2d3e..08728deec4 100644 --- a/src/screens/settings/About.tsx +++ b/src/screens/settings/About.tsx @@ -93,16 +93,16 @@ export function About() { } > - + - + - + diff --git a/src/screens/settings/Backup.tsx b/src/screens/settings/Backup.tsx index 475246251d..d4be0c3bba 100644 --- a/src/screens/settings/Backup.tsx +++ b/src/screens/settings/Backup.tsx @@ -161,7 +161,7 @@ export function Backup() { return ( <> - +