diff --git a/client/components/CubePreview.js b/client/components/CubePreview.js index 6f77c1fe8..4b8fd4ace 100644 --- a/client/components/CubePreview.js +++ b/client/components/CubePreview.js @@ -16,57 +16,38 @@ * * Modified from the original version in CubeCobra. See LICENSE.CubeCobra for more information. */ -import React, { useCallback, useState } from 'react'; +import React from 'react'; +import { Card, CardActionArea, CardContent, CardMedia, Link, Typography } from '@mui/material'; import CubePropType from '@cubeartisan/client/proptypes/CubePropType.js'; - -import { Card } from 'reactstrap'; - -import AspectRatioBox from '@cubeartisan/client/components/AspectRatioBox.js'; - import { getCubeDescription, getCubeId } from '@cubeartisan/client/utils/Util.js'; -const CubePreview = ({ cube }) => { - const [hover, setHover] = useState(false); - const handleMouseOver = useCallback((event) => setHover(!event.target.getAttribute('data-sublink')), []); - const handleMouseOut = useCallback(() => setHover(false), []); - const handleClick = useCallback( - (event) => { - if (!event.target.getAttribute('data-sublink')) { - window.location.href = `/cube/${encodeURIComponent(getCubeId(cube))}`; - } - }, - [cube], - ); - - return ( - - - {cube.image_name} - Art by {cube.image_artist} - -
-
+const CubePreview = ({ cube }) => ( + + + + + + Art by {cube.image_artist} + + {cube.name} -
-
{getCubeDescription(cube)}
- - Designed by{' '} - - {cube.owner_name} - - -
-
- ); -}; + + + {getCubeDescription(cube)} + + + Designed by {cube.owner_name} + + + + +); CubePreview.propTypes = { cube: CubePropType.isRequired, diff --git a/client/components/layouts/MainLayout.js b/client/components/layouts/MainLayout.js index 8df77e30a..b5b8c96d3 100644 --- a/client/components/layouts/MainLayout.js +++ b/client/components/layouts/MainLayout.js @@ -30,23 +30,24 @@ import SiteAppBar from '@cubeartisan/client/components/SiteAppBar.js'; * @type ComponentType */ const MainLayout = ({ children, loginCallback }) => ( - - - + <> + + + + + + {children} + + + +