Redesign library navigation in experimental layout
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import Button from '@mui/material/Button/Button';
|
||||
import React, { FC } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import { useSystemInfo } from 'hooks/useSystemInfo';
|
||||
|
||||
const ServerButton: FC = () => {
|
||||
const {
|
||||
data: systemInfo,
|
||||
isPending
|
||||
} = useSystemInfo();
|
||||
|
||||
return (
|
||||
<Button
|
||||
variant='text'
|
||||
size='large'
|
||||
color='inherit'
|
||||
startIcon={
|
||||
<img
|
||||
src='assets/img/icon-transparent.png'
|
||||
alt=''
|
||||
aria-hidden
|
||||
style={{
|
||||
maxHeight: '1.25em',
|
||||
maxWidth: '1.25em'
|
||||
}}
|
||||
/>
|
||||
}
|
||||
component={Link}
|
||||
to='/'
|
||||
>
|
||||
{isPending ? '' : (systemInfo?.ServerName || 'Jellyfin')}
|
||||
</Button>
|
||||
);
|
||||
};
|
||||
|
||||
export default ServerButton;
|
||||
Reference in New Issue
Block a user