Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add motion #561

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "corona-tracker",
"version": "1.0.0",
"version": "1.0.1",
"homepage": ".",
"private": true,
"prettier": "@blockstack/prettier-config",
Expand Down
116 changes: 63 additions & 53 deletions client/src/components/About.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Typography from '@material-ui/core/Typography';
import { makeStyles } from '@material-ui/core/styles';
import Container from '@material-ui/core/Container';
import Link from '@material-ui/core/Link';
import { Transition, animated } from 'react-spring';
import { CodivId, AdvisoryBoard } from '../utils/imgUrl';

// TODO add once we get it :)
Expand Down Expand Up @@ -86,61 +87,70 @@ const About = () => {
const classes = useStyles();

return (
<div className={classes.root}>
<Grid>
<main>
<div className={classes.heroContent}>
<Container maxWidth="sm">
<Typography component="h1" variant="h3" align="center" color="textPrimary" gutterBottom>
For the community, by the community
<Grid>
<Transition
items
from={{ opacity: 0, transform: 'translate(100%, 0)' }}
enter={{ opacity: 1, transform: 'translate(0, 0)' }}
>
{props => (
<animated.div style={props}>
<main>
<div className={classes.heroContent}>
<Container maxWidth="sm">
<Typography component="h1" variant="h3" align="center" color="textPrimary" gutterBottom>
For the community, by the community
</Typography>
<Typography variant="body1" align="center" color="textSecondary" paragraph>
CoronaTracker is an easy-to-use, private-by-design, open-source application for monitoring your
health and staying informed during the COVID-19 crisis. Here&apos;s what we&apos;ve accomplished so
far
</Typography>
</Container>
</div>
<Container className={classes.cardGrid} maxWidth="md">
{/* End hero unit */}
<Grid container spacing={4}>
{cards.map(card => (
<Grid item key={card.id} xs={12} sm={6} md={4}>
<Card className={classes.card}>
<CardMedia className={classes.cardMedia} image={card.img} title="Image title" />
<CardContent className={classes.cardContent}>
<Typography gutterBottom variant="subtitle1" component="h2">
{card.title}
</Typography>
<Typography variant="body2">{card.about}</Typography>
</CardContent>
</Card>
</Grid>
))}
</Grid>
</Container>
</main>
<footer className={classes.footer}>
<Typography variant="h6" align="center" gutterBottom>
Support Us!
</Typography>
<Typography variant="body1" align="center" color="textSecondary" paragraph>
CoronaTracker is an easy-to-use, private-by-design, open-source application for monitoring your health
and staying informed during the COVID-19 crisis. Here&apos;s what we&apos;ve accomplished so far
<Typography variant="body1" align="center" color="textSecondary" component="p">
Star our GitHub, fill out our user survey, anything counts! CoronaTracker is made with{' '}
<span role="img" aria-label="heart">
❤️
</span>{' '}
in NYC and across the globe
</Typography>
</Container>
</div>
<Container className={classes.cardGrid} maxWidth="md">
{/* End hero unit */}
<Grid container spacing={4}>
{cards.map(card => (
<Grid item key={card.id} xs={12} sm={6} md={4}>
<Card className={classes.card}>
<CardMedia className={classes.cardMedia} image={card.img} title="Image title" />
<CardContent className={classes.cardContent}>
<Typography gutterBottom variant="subtitle1" component="h2">
{card.title}
</Typography>
<Typography variant="body2">{card.about}</Typography>
</CardContent>
</Card>
</Grid>
))}
</Grid>
</Container>
</main>
<footer className={classes.footer}>
<Typography variant="h6" align="center" gutterBottom>
Support Us!
</Typography>
<Typography variant="body1" align="center" color="textSecondary" component="p">
Star our GitHub, fill out our user survey, anything counts! CoronaTracker is made with{' '}
<span role="img" aria-label="heart">
❤️
</span>{' '}
in NYC and across the globe
</Typography>
<Link
className={classes.color}
href="https://docs.google.com/forms/d/1sMp_qZYIrVxY6dxVCfIF6XQCU2lUeM_3qITC8hOph1w/edit"
color="inherit"
>
Take our Beta Survey!
</Link>
{/* <Copyright /> */}
</footer>
</Grid>
</div>
<Link
className={classes.color}
href="https://docs.google.com/forms/d/1sMp_qZYIrVxY6dxVCfIF6XQCU2lUeM_3qITC8hOph1w/edit"
color="inherit"
>
Take our Beta Survey!
</Link>
{/* <Copyright /> */}
</footer>
</animated.div>
)}
</Transition>
</Grid>
);
};

Expand Down
27 changes: 19 additions & 8 deletions client/src/components/DiagnosticContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useBlockstack } from 'react-blockstack';
import { useTranslation } from 'react-i18next';
import { makeStyles } from '@material-ui/core/styles';
import { Typography } from '@material-ui/core';
import { Transition, animated } from 'react-spring';
import HealthLogToggle from './HealthLogToggle';
import Survey from './survey/Survey';

Expand Down Expand Up @@ -43,14 +44,24 @@ function DiagnosticContainer() {

return hasSubmitted() ? (
<div>
<Typography variant="h5">
{t('hello')} <b>{userSession.loadUserData().profile.name}</b>
</Typography>
<Typography variant="h6">
{t('todayText')} <b>{today.toLocaleDateString(undefined, dateOptions)}</b>{' '}
</Typography>
<hr className={classes.hr} />
<HealthLogToggle />
<Transition
items
from={{ opacity: 0, transform: 'translate(0, 100%)' }}
enter={{ opacity: 1, transform: 'translate(0, 0%)' }}
>
{props => (
<animated.div style={props}>
<Typography variant="h5">
{t('hello')} <b>{userSession.loadUserData().profile.name}</b>
</Typography>
<Typography variant="h6">
{t('todayText')} <b>{today.toLocaleDateString(undefined, dateOptions)}</b>{' '}
</Typography>
<hr className={classes.hr} />
<HealthLogToggle />
</animated.div>
)}
</Transition>
</div>
) : (
<Survey />
Expand Down
Loading