@@ -4,7 +4,7 @@ import React, { useState } from "react";
44import t from "prop-types" ;
55import loadable from "@loadable/component" ;
66import styled from "styled-components/macro" ;
7- import { Col , Layout , Menu , Row , Spin } from "antd" ;
7+ import { Col , Layout , Row , Spin } from "antd" ;
88import { Helmet } from "react-helmet" ;
99import { BrowserRouter , NavLink , Route , Switch , useParams } from "react-router-dom" ;
1010import { ReactComponent as Logo } from "../assets/images/kleros-logo-flat-light.svg" ;
@@ -17,6 +17,8 @@ import ChainChangeWatcher from "./chain-change-watcher";
1717import drizzle , { DrizzleProvider , Initializer , useDrizzle } from "./drizzle" ;
1818import ErrorBoundary from "../components/error-boundary" ;
1919import SwitchChainFallback from "../components/error-fallback/switch-chain" ;
20+ import MenuMobile from "../components/menu/index" ;
21+ import MenuPc from "../components/menu/styledMenu" ;
2022
2123export default function App ( ) {
2224 const [ isMenuClosed , setIsMenuClosed ] = useState ( true ) ;
@@ -45,7 +47,7 @@ export default function App() {
4547 collapsed = { isMenuClosed }
4648 onClick = { ( ) => setIsMenuClosed ( ( previousState ) => ! previousState ) }
4749 >
48- < Menu theme = "dark" > { MenuItems } </ Menu >
50+ < MenuMobile > </ MenuMobile >
4951 </ StyledLayoutSider >
5052 < Layout >
5153 < StyledLayoutHeader >
@@ -56,9 +58,7 @@ export default function App() {
5658 </ LogoNavLink >
5759 </ StyledLogoCol >
5860 < Col lg = { 14 } md = { 12 } xs = { 0 } style = { { padding : "0 16px" } } >
59- < StyledMenu mode = "horizontal" theme = "dark" >
60- { MenuItems }
61- </ StyledMenu >
61+ < MenuPc > </ MenuPc >
6262 </ Col >
6363 < StyledTrayCol lg = { 6 } md = { 8 } sm = { 12 } xs = { 24 } >
6464 < StyledTray >
@@ -172,27 +172,6 @@ const ConvertPnk = loadable(() => import(/* webpackPrefetch: true */ "../contain
172172 fallback : < StyledSpin /> ,
173173} ) ;
174174
175- const MenuItems = [
176- < Menu . Item key = "home" >
177- < NavLink to = "/" > Home</ NavLink >
178- </ Menu . Item > ,
179- < Menu . Item key = "courts" >
180- < NavLink to = "/courts" > Courts</ NavLink >
181- </ Menu . Item > ,
182- < Menu . Item key = "cases" >
183- < NavLink to = "/cases" > My Cases</ NavLink >
184- </ Menu . Item > ,
185- < Menu . Item key = "guide" >
186- < a
187- href = "https://blog.kleros.io/become-a-juror-blockchain-dispute-resolution-on-ethereum/"
188- rel = "noopener noreferrer"
189- target = "_blank"
190- >
191- Guide
192- </ a >
193- </ Menu . Item > ,
194- ] ;
195-
196175const settings = {
197176 draw : "When I am drawn as a juror." ,
198177 appeal : "When a case I ruled is appealed." ,
@@ -247,35 +226,6 @@ const StyledTrayCol = styled(Col)`
247226 height: 64px;
248227` ;
249228
250- const StyledMenu = styled ( Menu ) `
251- font-weight: 500;
252- line-height: 64px !important;
253- text-align: center;
254-
255- &.ant-menu-dark {
256- background-color: transparent;
257- }
258-
259- && {
260- .ant-menu-item > a {
261- color: rgba(255, 255, 255, 0.85);
262-
263- &.hover,
264- &.focus {
265- color: rgba(255, 255, 255, 1);
266- }
267- }
268-
269- .ant-menu-item-selected {
270- background-color: transparent !important;
271-
272- > a {
273- color: rgba(255, 255, 255, 1);
274- }
275- }
276- }
277- ` ;
278-
279229const StyledLayoutContent = styled ( Layout . Content ) `
280230 background: #f2e3ff;
281231 // The header takes exactly 64px
0 commit comments