From c49e9d6801f9037a90446e32280af20f4f35a635 Mon Sep 17 00:00:00 2001 From: Justin Campbell Date: Sun, 18 Apr 2021 21:26:55 -0400 Subject: [PATCH] Update ItemViewAppBar PropTypes --- .../ItemViewAppBar/ItemViewAppBar.js | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/ItemViewAppBar/ItemViewAppBar.js b/src/components/ItemViewAppBar/ItemViewAppBar.js index aa243b3..1949027 100644 --- a/src/components/ItemViewAppBar/ItemViewAppBar.js +++ b/src/components/ItemViewAppBar/ItemViewAppBar.js @@ -1,11 +1,11 @@ import React, { useEffect } from "react"; import { useHistory } from "react-router-dom"; import PropTypes from "prop-types"; -import {makeStyles, Tooltip, Typography, AppBar, Toolbar, IconButton, Zoom, useTheme} from "@material-ui/core" +import { makeStyles, Tooltip, Typography, AppBar, Toolbar, IconButton, Zoom, useTheme } from "@material-ui/core" import CloseItemViewIcon from '@material-ui/icons/ChevronRight'; -export default function ItemViewAppBar({ title, setSidebarOpen }){ +export default function ItemViewAppBar({ title, setSidebarOpen }) { useEffect(() => { setSidebarOpen(true) @@ -28,15 +28,14 @@ export default function ItemViewAppBar({ title, setSidebarOpen }){ const history = useHistory(); - return( + return ( <> - - + + - - { + { history.push("/"); }} TransitionComponent={Zoom} @@ -51,14 +50,15 @@ export default function ItemViewAppBar({ title, setSidebarOpen }){ - + ); } ItemViewAppBar.propTypes = { - - /** Function to toggle sidebar open. */ + /** Function reference to stateful variable toggle sidebar open.
+ * Signature: function(sidebarOpen: boolean) => void
+ */ "setSidebarOpen": PropTypes.func.isRequired, /** The title of the app bar. */ "title": PropTypes.string