Skip to content

Commit

Permalink
[docs] Fix build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rtivital committed Mar 21, 2023
1 parent 3198f6d commit 693f70a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/src/components/Layout/LayoutInner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,11 @@ export function LayoutInner({ children, location }: LayoutProps) {
const { classes, cx } = useStyles({ shouldRenderHeader });
const [navbarOpened, setNavbarState] = useState(false);
const data = getDocsData(useStaticQuery(query));
const [spotlightQuery, setSpotlightQuery] = useState(
new URLSearchParams(window.location.search).get(searchParamName) || ''
);
const [spotlightQuery, setSpotlightQuery] = useState('');

useEffect(() => {
setSpotlightQuery(new URLSearchParams(window.location.search).get(searchParamName) || '');
}, []);

return (
<SpotlightProvider
Expand Down

0 comments on commit 693f70a

Please sign in to comment.