fix links to work on a bare host (#132)
This commit is contained in:
@@ -7,8 +7,20 @@
|
||||
|
||||
import React from 'react';
|
||||
import ListItem, { ListItemProps } from '@mui/material/ListItem';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
export default function ListItemLink(props: ListItemProps<'a', { button?: true }>) {
|
||||
export default function ListItemLink(props: ListItemProps<Link, {}>) {
|
||||
return (
|
||||
<ListItem
|
||||
// @ts-ignore
|
||||
// sx={{ color: 'white', textDecoration: 'none', '-webkit-text-decoration': 'none' }}
|
||||
// @ts-ignore
|
||||
button
|
||||
component={Link}
|
||||
// eslint-disable-next-line react/jsx-props-no-spreading
|
||||
return <ListItem button component="a" {...props} />;
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
// eslint-disable-next-line react/jsx-props-no-spreading
|
||||
// return <ListItem button component="a" {...props} />;
|
||||
}
|
||||
|
||||
@@ -60,13 +60,13 @@ export default function Settings() {
|
||||
return (
|
||||
<>
|
||||
<List sx={{ padding: 0 }}>
|
||||
<ListItemLink href="/settings/categories">
|
||||
<ListItemLink to="/settings/categories">
|
||||
<ListItemIcon>
|
||||
<ListAltIcon />
|
||||
</ListItemIcon>
|
||||
<ListItemText primary="Categories" />
|
||||
</ListItemLink>
|
||||
<ListItemLink href="/settings/backup">
|
||||
<ListItemLink to="/settings/backup">
|
||||
<ListItemIcon>
|
||||
<BackupIcon />
|
||||
</ListItemIcon>
|
||||
@@ -134,7 +134,7 @@ export default function Settings() {
|
||||
</IconButton>
|
||||
</ListItemSecondaryAction>
|
||||
</ListItem>
|
||||
<ListItemLink href="/settings/about">
|
||||
<ListItemLink to="/settings/about">
|
||||
<ListItemIcon>
|
||||
<InfoIcon />
|
||||
</ListItemIcon>
|
||||
|
||||
@@ -44,10 +44,10 @@ export default function About() {
|
||||
<ListItem>
|
||||
<ListItemText primary="Build time" secondary={buildTime()} />
|
||||
</ListItem>
|
||||
<ListItemLink href={about.github}>
|
||||
<ListItemLink to={about.github}>
|
||||
<ListItemText primary="Github" secondary={about.github} />
|
||||
</ListItemLink>
|
||||
<ListItemLink href={about.discord}>
|
||||
<ListItemLink to={about.discord}>
|
||||
<ListItemText primary="Discord" secondary={about.discord} />
|
||||
</ListItemLink>
|
||||
</List>
|
||||
|
||||
@@ -68,7 +68,7 @@ export default function Backup() {
|
||||
return (
|
||||
<>
|
||||
<List sx={{ padding: 0 }}>
|
||||
<ListItemLink href={`${baseURL}/api/v1/backup/export/file`}>
|
||||
<ListItemLink to={`${baseURL}/api/v1/backup/export/file`}>
|
||||
<ListItemText
|
||||
primary="Create Backup"
|
||||
secondary="Backup library as a Tachiyomi backup"
|
||||
|
||||
Reference in New Issue
Block a user