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