diff --git a/src/components/layout/Layout.tsx b/src/components/layout/Layout.tsx index 2f56656..d919f05 100644 --- a/src/components/layout/Layout.tsx +++ b/src/components/layout/Layout.tsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; import { useHistory } from 'react-router-dom'; -import { ButtonToolbar, Content, FlexboxGrid, Icon, InputGroup } from 'rsuite'; +import { ButtonToolbar, Content, FlexboxGrid, Icon } from 'rsuite'; import Sidebar from './Sidebar'; import Titlebar from './Titlebar'; import { RootContainer, RootFooter, MainContainer } from './styled'; @@ -144,60 +144,59 @@ const Layout = ({ footer, children, disableSidebar, font }: any) => { - - {misc.searchQuery !== '' || openSearch ? ( - - - - - { - if (misc.searchQuery.trim()) { - history.push(`/search?query=${misc.searchQuery}`); - } - }} - onKeyDown={(e: KeyboardEvent) => { - if (e.key === 'Escape') { + + + {misc.searchQuery !== '' || openSearch ? ( + + { + if (misc.searchQuery.trim()) { + history.push(`/search?query=${misc.searchQuery}`); + } + }} + onKeyDown={(e: KeyboardEvent) => { + if (e.key === 'Escape') { + dispatch(setSearchQuery('')); + setOpenSearch(false); + } + }} + style={{ width: '180px' }} + /> + { dispatch(setSearchQuery('')); setOpenSearch(false); - } - }} - style={{ width: '180px' }} - /> - { + if (e.key === ' ' || e.key === 'Enter') { + dispatch(setSearchQuery('')); + setOpenSearch(false); + } + }} + > + + + + ) : ( + { - dispatch(setSearchQuery('')); - setOpenSearch(false); + setOpenSearch(true); + setTimeout(() => { + document.getElementById('local-search-input')?.focus(); + }, 50); }} - onKeyDown={(e: any) => { - if (e.key === ' ' || e.key === 'Enter') { - dispatch(setSearchQuery('')); - setOpenSearch(false); - } - }} - > - - - - ) : ( - { - setOpenSearch(true); - setTimeout(() => { - document.getElementById('local-search-input')?.focus(); - }, 50); - }} - appearance="subtle" - icon={} - /> - )} - + appearance="subtle" + icon={} + /> + )} + + diff --git a/src/components/layout/styled.tsx b/src/components/layout/styled.tsx index c344aab..5bb29b0 100644 --- a/src/components/layout/styled.tsx +++ b/src/components/layout/styled.tsx @@ -284,7 +284,7 @@ export const BlurredBackground = styled.img<{ expanded: boolean }>` margin: 0px !important; padding: 0px !important; width: 100%; - height: 202px; + height: 210px; z-index: -1; user-select: none; pointer-events: none;