File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
DialogTorrentDetailsContent/Table Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 11import axios from 'axios'
2- import { useEffect , useState } from 'react'
2+ import { useEffect , useState , useMemo } from 'react'
33import Button from '@material-ui/core/Button'
44import InfoIcon from '@material-ui/icons/Info'
55import ListItemIcon from '@material-ui/core/ListItemIcon'
@@ -25,13 +25,13 @@ export default function AboutDialog() {
2525
2626 const onClose = ( ) => setOpen ( false )
2727 const ref = useOnStandaloneAppOutsideClick ( onClose )
28- const getBasePath = ( ) => {
28+ // Use useMemo to compute basePath once
29+ const basePath = useMemo ( ( ) => {
2930 if ( typeof window !== 'undefined' ) {
3031 return window . location . pathname . split ( '/' ) [ 1 ] || ''
3132 }
3233 return ''
33- }
34- const basePath = getBasePath ( )
34+ } , [ ] )
3535
3636 return (
3737 < >
@@ -64,7 +64,7 @@ export default function AboutDialog() {
6464 < HeaderSection >
6565 < div > { t ( 'About' ) } </ div >
6666 { torrServerVersion }
67- < img src = { `${ basePath } /icon.png` } alt = 'ts-icon' />
67+ < img src = { `${ basePath ? `/ ${ basePath } ` : '' } /icon.png` } alt = 'ts-icon' />
6868 </ HeaderSection >
6969
7070 < div style = { { overflow : 'auto' } } >
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ export const TableStyle = styled.table`
7676
7777 .button-cell {
7878 display: grid;
79- grid-template-columns: repeat(auto-fit, minmax(140px , 1fr));
79+ grid-template-columns: repeat(auto-fit, minmax(100px , 1fr));
8080 gap: 10px;
8181 }
8282
You can’t perform that action at this time.
0 commit comments