feat: update logo (#401)

* style: update logo

* feat: use both desktop and dashboard logo

* test: remove App.test

* build: fix depcheck
This commit is contained in:
Cafe137
2022-06-20 12:06:08 +02:00
committed by GitHub
parent 127d44fd7a
commit 36fc4bfe98
5 changed files with 17 additions and 25 deletions
+1
View File
@@ -1,5 +1,6 @@
{
"ignores": [
"@testing-library/react",
"@types/*",
"@commitlint/config-conventional",
"@babel/*",
-23
View File
@@ -1,23 +0,0 @@
import { render } from '@testing-library/react'
import App from './App'
// Mocks methods that are not implemented in JSDOM
// see https://jestjs.io/docs/manual-mocks#mocking-methods-which-are-not-implemented-in-jsdom
Object.defineProperty(window, 'matchMedia', {
writable: true,
value: jest.fn().mockImplementation(query => ({
matches: false,
media: query,
onchange: null,
addListener: jest.fn(), // deprecated
removeListener: jest.fn(), // deprecated
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
dispatchEvent: jest.fn(),
})),
})
// TODO: this is not a good test and should be removed. Keeping it in to make sure the whole app renders (to be used in CI)
test('should render the app', () => {
render(<App />)
})

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

+5 -2
View File
@@ -5,8 +5,10 @@ import { OpenInNewSharp } from '@material-ui/icons'
import { ReactElement, useContext } from 'react'
import { BookOpen, Briefcase, DollarSign, FileText, Home, Settings } from 'react-feather'
import { Link } from 'react-router-dom'
import Logo from '../assets/logo.svg'
import DashboardLogo from '../assets/dashboard-logo.svg'
import DesktopLogo from '../assets/desktop-logo.svg'
import { config } from '../config'
import { useIsBeeDesktop } from '../hooks/apiHooks'
import { Context } from '../providers/Bee'
import { ROUTES } from '../routes'
import SideBarItem from './SideBarItem'
@@ -96,13 +98,14 @@ const useStyles = makeStyles((theme: Theme) =>
export default function SideBar(): ReactElement {
const classes = useStyles()
const { nodeInfo } = useContext(Context)
const { isBeeDesktop } = useIsBeeDesktop()
return (
<Drawer className={classes.drawer} variant="permanent" anchor="left" classes={{ paper: classes.drawerPaper }}>
<Grid container direction="column" justifyContent="space-between" className={classes.root}>
<Grid className={classes.logo}>
<Link to={ROUTES.INFO}>
<img alt="swarm" src={Logo} />
<img alt="swarm" src={isBeeDesktop ? DesktopLogo : DashboardLogo} />
</Link>
</Grid>
<Grid>