diff --git a/catalog/app/components/Footer/Footer.tsx b/catalog/app/components/Footer/Footer.tsx index c5252462d8f..918d099f29f 100644 --- a/catalog/app/components/Footer/Footer.tsx +++ b/catalog/app/components/Footer/Footer.tsx @@ -10,12 +10,9 @@ import * as style from 'constants/style' import * as URLS from 'constants/urls' import * as Notifications from 'containers/Notifications' import * as CatalogSettings from 'utils/CatalogSettings' -import * as GQL from 'utils/GraphQL' import * as NamedRoutes from 'utils/NamedRoutes' import copyToClipboard from 'utils/clipboard' -import STACK_QUERY from 'utils/Stack.generated' - import bg from './bg.png' import iconFacebook from './icon-facebook.svg' import iconGithub from './icon-github.svg' @@ -36,13 +33,12 @@ const useVersionStyles = M.makeStyles((t) => ({ })) function Version() { - const { stack } = GQL.useQueryS(STACK_QUERY) const classes = useVersionStyles() const { push } = Notifications.use() const handleCopy = React.useCallback(() => { - copyToClipboard(stack.version || '') + copyToClipboard(cfg.stackVersion || '') push('Web catalog container hash has been copied to clipboard') - }, [push, stack.version]) + }, [push]) return ( - Version: {stack.version} + Version: {cfg.stackVersion} ) } diff --git a/catalog/app/components/Layout/Layout.tsx b/catalog/app/components/Layout/Layout.tsx index 8335222c4ae..f9c3c4d2435 100644 --- a/catalog/app/components/Layout/Layout.tsx +++ b/catalog/app/components/Layout/Layout.tsx @@ -3,40 +3,10 @@ import { useRouteMatch } from 'react-router-dom' import * as M from '@material-ui/core' import Footer from 'components/Footer' -import * as style from 'constants/style' import * as Bookmarks from 'containers/Bookmarks' import * as NavBar from 'containers/NavBar' -import { createBoundary } from 'utils/ErrorBoundary' import * as NamedRoutes from 'utils/NamedRoutes' -const useComponentErrorStyles = M.makeStyles((t) => ({ - root: { - background: t.palette.secondary.dark, - position: 'relative', - }, - container: { - color: t.palette.error.light, - padding: t.spacing(2), - }, -})) - -function ComponentError() { - const classes = useComponentErrorStyles() - return ( -
- - Failed to render component - -
- ) -} - -const ErrorBoundary = createBoundary(() => () => ( - - - -)) - const useRootStyles = M.makeStyles({ root: { overflowX: 'hidden', @@ -79,11 +49,11 @@ export function Layout({ bare = false, dark = false, children, pre }: LayoutProp return ( - {bare ? : } + {bare ? : } {!!pre && pre} {!!children && {children}} - {!!isHomepage && isHomepage.isExact &&