From 12827629d464c15bd910b3a3c4b49eba6a21a9ef Mon Sep 17 00:00:00 2001 From: Cafe137 Date: Mon, 20 Jun 2022 11:40:06 +0200 Subject: [PATCH 1/4] style: update logo --- src/assets/logo.svg | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/assets/logo.svg b/src/assets/logo.svg index 418dca7c..9ac6b054 100644 --- a/src/assets/logo.svg +++ b/src/assets/logo.svg @@ -1,11 +1,11 @@ - - - - - - - - + + + Swarm Dashboard logo Copy 7 + + + + + - + \ No newline at end of file From b181b0018caafee92b965aa9de1ee3b891027c2e Mon Sep 17 00:00:00 2001 From: Cafe137 Date: Mon, 20 Jun 2022 11:45:37 +0200 Subject: [PATCH 2/4] feat: use both desktop and dashboard logo --- src/assets/dashboard-logo.svg | 11 +++++++++++ src/assets/{logo.svg => desktop-logo.svg} | 0 src/components/SideBar.tsx | 7 +++++-- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 src/assets/dashboard-logo.svg rename src/assets/{logo.svg => desktop-logo.svg} (100%) diff --git a/src/assets/dashboard-logo.svg b/src/assets/dashboard-logo.svg new file mode 100644 index 00000000..418dca7c --- /dev/null +++ b/src/assets/dashboard-logo.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/assets/logo.svg b/src/assets/desktop-logo.svg similarity index 100% rename from src/assets/logo.svg rename to src/assets/desktop-logo.svg diff --git a/src/components/SideBar.tsx b/src/components/SideBar.tsx index 9dd1ce99..d47fb3c8 100644 --- a/src/components/SideBar.tsx +++ b/src/components/SideBar.tsx @@ -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' @@ -94,13 +96,14 @@ const useStyles = makeStyles((theme: Theme) => export default function SideBar(): ReactElement { const classes = useStyles() const { nodeInfo } = useContext(Context) + const { isBeeDesktop } = useIsBeeDesktop() return ( - swarm + swarm From 304b488cf420037d41d3ebcc3dcd135902d44982 Mon Sep 17 00:00:00 2001 From: Cafe137 Date: Mon, 20 Jun 2022 11:53:33 +0200 Subject: [PATCH 3/4] test: remove App.test --- src/App.test.tsx | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 src/App.test.tsx diff --git a/src/App.test.tsx b/src/App.test.tsx deleted file mode 100644 index 1485fbbc..00000000 --- a/src/App.test.tsx +++ /dev/null @@ -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() -}) From 91c85a809c14bddf3df72dd4eadbffebb3947f9d Mon Sep 17 00:00:00 2001 From: Cafe137 Date: Mon, 20 Jun 2022 12:02:11 +0200 Subject: [PATCH 4/4] build: fix depcheck --- .depcheckrc.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.depcheckrc.json b/.depcheckrc.json index 9e2c1cde..2f958847 100644 --- a/.depcheckrc.json +++ b/.depcheckrc.json @@ -1,5 +1,6 @@ { "ignores": [ + "@testing-library/react", "@types/*", "@commitlint/config-conventional", "@babel/*",