From c2d5b0146fe417c521f42454972a375fb938a541 Mon Sep 17 00:00:00 2001 From: Barry Gitarts Date: Tue, 27 Aug 2019 15:47:36 -0400 Subject: [PATCH] adjust fund project for small viewport --- src/components/projects/FundProject.jsx | 15 ++++++++++++--- src/components/projects/styles/FundProject.js | 3 +++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/components/projects/FundProject.jsx b/src/components/projects/FundProject.jsx index bfeae9f..f238db5 100644 --- a/src/components/projects/FundProject.jsx +++ b/src/components/projects/FundProject.jsx @@ -6,6 +6,7 @@ import { useQuery } from '@apollo/react-hooks' import LiquidPledging from '../../embarkArtifacts/contracts/LiquidPledging' import Button from '@material-ui/core/Button' import Typography from '@material-ui/core/Typography' +import useWindowSize from '@rehooks/window-size' import { FundingContext } from '../../context' import TextDisplay from '../base/TextDisplay' import Icon from '../base/icons/IconByName' @@ -55,6 +56,8 @@ const SubmissionSection = ({ classes, projectData, projectId, profileData, start const pledgesInfo = pledgesInfos[0] const tokenLabel = getTokenLabel(projectInfo.goalToken) const totalPledged = getAmountFromPledgesInfo(pledgesInfo) + const windowSize = useWindowSize() + const isSmall = windowSize.innerWidth < 800 const isVideo = useMemo(() => getMediaType(projectAssets), [projectAssets, projectId]) const mediaUrl = useMemo(() => getMediaSrc(projectAssets), [projectAssets, projectId]) const createdDate = getDateCreated(projectAge) @@ -112,7 +115,9 @@ const SubmissionSection = ({ classes, projectData, projectId, profileData, start return (
- {manifest &&
+ {manifest &&
{manifest.code}
- + } - {manifest &&
+ {manifest &&
{isCreator ? 'Edit' : ''}
{`${totalPledged.toLocaleString()} ${tokenLabel}`} pledged diff --git a/src/components/projects/styles/FundProject.js b/src/components/projects/styles/FundProject.js index 61e5cf2..1250063 100644 --- a/src/components/projects/styles/FundProject.js +++ b/src/components/projects/styles/FundProject.js @@ -106,6 +106,9 @@ const styles = theme => ({ maxHeight: '40vh', maxWidth: '30vw' }, + imgSmallViewport: { + maxWidth: '100%' + }, chatRoomIcon: { justifySelf: 'auto' },