aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pages/HomePage/HomePage.tsx59
-rw-r--r--src/pages/NotificationsPage/NotificationsPage.tsx2
2 files changed, 34 insertions, 27 deletions
diff --git a/src/pages/HomePage/HomePage.tsx b/src/pages/HomePage/HomePage.tsx
index f3cadee..8995630 100644
--- a/src/pages/HomePage/HomePage.tsx
+++ b/src/pages/HomePage/HomePage.tsx
@@ -1,5 +1,11 @@
import React, { useState, useEffect } from 'react';
-import { Typography, Divider, Grid, Button, Link } from '@material-ui/core/';
+import {
+ Typography,
+ Divider,
+ Grid,
+ Button,
+ Link
+} from '@material-ui/core/';
import { makeStyles } from '@material-ui/core/styles';
import TrendingUpIcon from '@material-ui/icons/TrendingUp';
import { Rating } from '@material-ui/lab';
@@ -28,7 +34,6 @@ const HomePage: React.FC = () => {
const { navigate } = useNavigate();
const { isAuthenticated } = useAuth();
-
const rating = feedbacks.length && feedbacks.reduce(
(acc: number, feedback: Feedback) => acc + feedback.score,
0
@@ -48,12 +53,18 @@ const HomePage: React.FC = () => {
navigate('auth');
};
+ const GithubLink = <Link href="https://github.com/which-ecosystem">GitHub</Link>;
+ const TypescriptLink = <Link href="https://www.typescriptlang.org/">Typescript</Link>;
+ const ReactLink = <Link href="https://reactjs.org/">React</Link>;
+ const FeathersLink = <Link href="https://feathersjs.com">Feathers</Link>;
+ const MUILink = <Link href="https://material-ui.com">Material-UI</Link>;
+
return (
<Grid container spacing={4}>
<Grid item xs={4}>
<Grid container direction="column" spacing={1} alignItems="center">
<Grid item>
- <img src={process.env.PUBLIC_URL + '/which-logo-512.png'} alt="logo" className={classes.logo}/>
+ <img src={`${process.env.PUBLIC_URL}/which-logo-512.png`} alt="logo" className={classes.logo} />
</Grid>
<Grid item>
<Rating value={rating} readOnly size="large" />
@@ -71,20 +82,25 @@ const HomePage: React.FC = () => {
<Typography variant="h4"> Which one to choose? </Typography>
<Divider />
<Typography>
- <p>Have you ever found yourself stuck between two options, not being able to choose any? This is exactly the problem we are going to solve!</p>
+ <p>
+ Have you ever found yourself stuck between two options, not being able to choose any?
+ This is exactly the problem we are going to solve!
+ </p>
<p>Share your minor everyday uncertainties with the whole world and see what others think!</p>
<Button variant="contained" color="primary" size="large" onClick={handleLetsGo}>
- let's go!
+ {'let\'s go!'}
</Button>
- {!isAuthenticated() && <Button
- variant="outlined"
- color="primary"
- size="large"
- className={classes.signup}
- onClick={handleSignUp}
- >
- sign up
- </Button>}
+ {!isAuthenticated() && (
+ <Button
+ variant="outlined"
+ color="primary"
+ size="large"
+ className={classes.signup}
+ onClick={handleSignUp}
+ >
+ sign up
+ </Button>
+ )}
</Typography>
</Grid>
<Grid item>
@@ -92,17 +108,8 @@ const HomePage: React.FC = () => {
<Divider />
<Typography>
<p>
- The project is written in <Link href="https://www.typescriptlang.org/">
- Typescript
- </Link> and features <Link href="https://reactjs.org/">
- React
- </Link>, <Link href="https://feathersjs.com/">
- Feathers
- </Link>, and <Link href="https://material-ui.com/">
- Material-UI
- </Link>.
- It is currently open-source and you can visit our <Link href="https://github.com/which-ecosystem">
- GitHub</Link> (make sure to star our repositories)!
+ The project is written in {TypescriptLink} and features {ReactLink}, {FeathersLink}, and {MUILink}.
+ It is currently open-source and you can visit our {GithubLink} (make sure to star our repositories)!
</p>
<p>
We encourage any developer to check it out. Feel free to open issues and create Pull Requests!
@@ -117,7 +124,7 @@ const HomePage: React.FC = () => {
startIcon={<TrendingUpIcon />}
href="https://github.com/orgs/which-ecosystem/projects/1"
>
- track our progress
+ track our progress
</Button>
</Typography>
</Grid>
diff --git a/src/pages/NotificationsPage/NotificationsPage.tsx b/src/pages/NotificationsPage/NotificationsPage.tsx
index 56243f9..d162eff 100644
--- a/src/pages/NotificationsPage/NotificationsPage.tsx
+++ b/src/pages/NotificationsPage/NotificationsPage.tsx
@@ -1,4 +1,4 @@
-import React, { useState } from 'react';
+import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import { Typography } from '@material-ui/core';