From 9c30d8255a04c2fa7eeceea58109b9416a4366ea Mon Sep 17 00:00:00 2001 From: Heather Yu <35639529+hetd54@users.noreply.github.com> Date: Thu, 3 Aug 2023 16:56:04 -0400 Subject: [PATCH 01/64] feat: add searchbar to layout --- .../gatsby-theme-project-portal/src/layouts/Layout.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/gatsby-theme-project-portal/src/layouts/Layout.tsx b/packages/gatsby-theme-project-portal/src/layouts/Layout.tsx index 337c05921..c69da50b2 100644 --- a/packages/gatsby-theme-project-portal/src/layouts/Layout.tsx +++ b/packages/gatsby-theme-project-portal/src/layouts/Layout.tsx @@ -1,10 +1,11 @@ -import React, { FunctionComponent, ReactNode } from "react" +import React, { FunctionComponent, ReactNode, useState } from "react" import { Footer, BottomBanner, DevelopmentBanner, Navbar, SiteMetadata, + SearchBar, } from "../components" import { useProjectPortalConfig } from "../hooks" @@ -23,6 +24,8 @@ function getShowDevBannerSetting(showDevBanner?: boolean) { return showDevBanner ?? showDevBannerThemeSetting } +const [searchQuery, setSearchQuery] = useState([]) + export const Layout: FunctionComponent = ({ activePage, title, @@ -37,6 +40,10 @@ export const Layout: FunctionComponent = ({ {coalescedShowDevBanner && } + setSearchQuery(e.target.value)} + />
{children}