File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
packages/react-renderer-demo/src/app/src/components Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,8 @@ const useStyles = makeStyles((theme) => ({
7272 } ,
7373 spinnerCheat : {
7474 flex : 1 ,
75- position : 'relative'
75+ position : 'relative' ,
76+ boxShadow : theme . shadows [ 1 ]
7677 } ,
7778 spinner : {
7879 position : 'absolute' ,
@@ -89,7 +90,6 @@ const useStyles = makeStyles((theme) => ({
8990 } ,
9091 '& iframe' : {
9192 border : 'none' ,
92- boxShadow : theme . shadows [ 1 ] ,
9393 [ theme . breakpoints . down ( 'sm' ) ] : {
9494 height : 500
9595 }
Original file line number Diff line number Diff line change @@ -139,13 +139,15 @@ const Layout = ({ children }) => {
139139 const [ openNotification , setOpenNotifiation ] = useState ( false ) ;
140140 const [ newMessages , setNewMessages ] = useState ( 0 ) ;
141141
142+ useEffect ( ( ) => {
143+ setLinks ( findConnectedLinks ( router . asPath , flatSchema ) || { } ) ;
144+ } , [ router . asPath ] ) ;
145+
142146 useEffect ( ( ) => {
143147 if ( window && window . innerWidth > 960 && router . pathname !== '/' ) {
144148 setOpen ( true ) ;
145149 }
146-
147- setLinks ( findConnectedLinks ( router . asPath , flatSchema ) || { } ) ;
148- } , [ router . asPath ] ) ;
150+ } , [ ] ) ;
149151
150152 const handleDrawerOpen = ( ) => {
151153 setOpen ( true ) ;
Original file line number Diff line number Diff line change 11/* eslint-disable react/prop-types */
2- import React , { useState , useRef } from 'react' ;
2+ import React , { useState } from 'react' ;
33import TextField from '@material-ui/core/TextField' ;
44import { useRouter } from 'next/router' ;
55import Mapper from './mapper' ;
@@ -124,13 +124,13 @@ const memoizeCurrent = () => {
124124} ;
125125
126126const search = memoizeSearch ( ) ;
127+ const current = memoizeCurrent ( ) ;
127128
128129const Menu = ( { schema, searchRef } ) => {
129130 const router = useRouter ( ) ;
130131 const [ value , setValue ] = useState ( '' ) ;
131132 const classes = useStyles ( ) ;
132133 const currentLocation = router . pathname . split ( '/' ) ;
133- const { current } = useRef ( memoizeCurrent ( ) ) ;
134134
135135 const schemaFiltered = value !== '' ? search ( schema , value ) : current ( schema , currentLocation ) ;
136136
You can’t perform that action at this time.
0 commit comments