Skip to content

Commit d372ebe

Browse files
authored
Merge pull request #55 from Visual-Regression-Tracker/18-logo
Logo added
2 parents 558c5d8 + 12fd36d commit d372ebe

File tree

10 files changed

+140
-203
lines changed

10 files changed

+140
-203
lines changed

public/favicon.ico

-3.08 KB
Binary file not shown.

public/favicon.png

7.73 KB
Loading

public/index.html

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,17 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
5+
<link rel="icon" href="%PUBLIC_URL%/favicon.png" />
66
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
77
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
88

99
<meta name="viewport" content="width=device-width, initial-scale=1" />
1010
<meta name="theme-color" content="#000000" />
11-
<meta
12-
name="description"
13-
content="Web site created using create-react-app"
14-
/>
15-
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
16-
<!--
17-
manifest.json provides metadata used when your web app is installed on a
18-
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
19-
-->
20-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
21-
<!--
22-
Notice the use of %PUBLIC_URL% in the tags above.
23-
It will be replaced with the URL of the `public` folder during the build.
24-
Only files inside the `public` folder can be referenced from the HTML.
25-
26-
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
27-
work correctly both with client-side routing and a non-root public URL.
28-
Learn how to configure a non-root public URL by running `npm run build`.
29-
-->
30-
<title>React App</title>
11+
12+
<title>Visual Regression Tracker</title>
3113
</head>
3214
<body>
3315
<noscript>You need to enable JavaScript to run this app.</noscript>
3416
<div id="root"></div>
35-
<!--
36-
This HTML file is a template.
37-
If you open it directly in the browser, you will see an empty page.
38-
39-
You can add webfonts, meta tags, or analytics to this file.
40-
The build step will place the bundled scripts into the <body> tag.
41-
42-
To begin the development, run `npm start` or `yarn start`.
43-
To create a production bundle, use `npm run build` or `yarn build`.
44-
-->
4517
</body>
4618
</html>

public/logo.png

73.1 KB
Loading

public/logo192.png

-5.22 KB
Binary file not shown.

public/logo512.png

-9.44 KB
Binary file not shown.

public/manifest.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/components/Header.tsx

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ import {
99
MenuItem,
1010
} from "@material-ui/core";
1111
import { Link } from "react-router-dom";
12-
import {
13-
useAuthState,
14-
useAuthDispatch,
15-
logout,
16-
} from "../contexts";
12+
import { useAuthState, useAuthDispatch, logout } from "../contexts";
1713
import { routes } from "../constants";
1814

1915
const Header: FunctionComponent = () => {
@@ -65,15 +61,11 @@ const Header: FunctionComponent = () => {
6561
<React.Fragment>
6662
<AppBar position="static" color="default">
6763
<Toolbar>
68-
<Grid container justify="space-between">
64+
<Grid container justify="space-between" alignItems="center">
6965
<Grid item>
70-
<Grid container>
71-
<Grid item>
72-
<Link to="/">
73-
<img src="/logo512.png" width="40" height="40" alt="logo" />
74-
</Link>
75-
</Grid>
76-
</Grid>
66+
<Link to="/">
67+
<img src="/logo.png" width="60" height="60" alt="logo" />
68+
</Link>
7769
</Grid>
7870
<Grid item>
7971
{loggedIn && (

src/pages/ProfilePage.tsx

Lines changed: 130 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
CardActions,
88
Button,
99
Typography,
10+
Box,
1011
} from "@material-ui/core";
1112
import { useAuthState, useAuthDispatch, update } from "../contexts";
1213
import { usersService } from "../services";
@@ -64,138 +65,142 @@ const ProfilePage = () => {
6465
};
6566

6667
return (
67-
<Grid
68-
container
69-
spacing={4}
70-
direction="column"
71-
alignItems="center"
72-
justify="center"
73-
style={{ minHeight: "60vh" }}
74-
>
75-
<Grid item>
76-
<Card variant="outlined">
77-
<CardContent>
78-
<Typography>apiKey: {user?.apiKey}</Typography>
79-
</CardContent>
80-
</Card>
81-
</Grid>
82-
<Grid item>
83-
<form onSubmit={handleUserUpdateSubmit}>
68+
<Box mt={2}>
69+
<Grid
70+
container
71+
spacing={4}
72+
direction="column"
73+
alignItems="center"
74+
justify="center"
75+
style={{ minHeight: "60vh" }}
76+
>
77+
<Grid item>
8478
<Card variant="outlined">
8579
<CardContent>
86-
<Grid container spacing={2}>
87-
<Grid item xs={6}>
88-
<TextField
89-
id="firstName"
90-
name="firstName"
91-
value={firstName}
92-
label={"First name"}
93-
type="text"
94-
variant="outlined"
95-
required
96-
fullWidth
97-
inputProps={{
98-
onChange: (event) =>
99-
setFirstName((event.target as HTMLInputElement).value),
100-
"data-testid": "firstName",
101-
}}
102-
/>
103-
</Grid>
104-
<Grid item xs={6}>
105-
<TextField
106-
id="lastName"
107-
name="lastName"
108-
value={lastName}
109-
label={"Last name"}
110-
type="text"
111-
variant="outlined"
112-
required
113-
fullWidth
114-
inputProps={{
115-
onChange: (event) =>
116-
setLastName((event.target as HTMLInputElement).value),
117-
"data-testid": "lastName",
118-
}}
119-
/>
120-
</Grid>
121-
<Grid item xs={12}>
122-
<TextField
123-
id="email"
124-
name="email"
125-
value={email}
126-
label={"Email address"}
127-
type="text"
128-
variant="outlined"
129-
required
130-
fullWidth
131-
inputProps={{
132-
onChange: (event) =>
133-
setEmail((event.target as HTMLInputElement).value),
134-
"data-testid": "email",
135-
}}
136-
/>
137-
</Grid>
138-
</Grid>
80+
<Typography>apiKey: {user?.apiKey}</Typography>
13981
</CardContent>
140-
<CardActions>
141-
<Grid container justify="center">
142-
<Grid item>
143-
<Button
144-
type="submit"
145-
color="primary"
146-
variant="outlined"
147-
data-testid="submit"
148-
>
149-
Update
150-
</Button>
151-
</Grid>
152-
</Grid>
153-
</CardActions>
15482
</Card>
155-
</form>
156-
</Grid>
157-
<Grid item>
158-
<form onSubmit={handlePasswordUpdateSubmit}>
159-
<Card variant="outlined">
160-
<CardContent>
161-
<Grid container spacing={2}>
162-
<Grid item xs={12}>
163-
<TextField
164-
id="password"
165-
name="password"
166-
value={password}
167-
label={"New password"}
168-
type="password"
169-
variant="outlined"
170-
required
171-
fullWidth
172-
inputProps={{
173-
onChange: (event) =>
174-
setPassword((event.target as HTMLInputElement).value),
175-
"data-testid": "password",
176-
}}
177-
/>
83+
</Grid>
84+
<Grid item>
85+
<form onSubmit={handleUserUpdateSubmit}>
86+
<Card variant="outlined">
87+
<CardContent>
88+
<Grid container spacing={2}>
89+
<Grid item xs={6}>
90+
<TextField
91+
id="firstName"
92+
name="firstName"
93+
value={firstName}
94+
label={"First name"}
95+
type="text"
96+
variant="outlined"
97+
required
98+
fullWidth
99+
inputProps={{
100+
onChange: (event) =>
101+
setFirstName(
102+
(event.target as HTMLInputElement).value
103+
),
104+
"data-testid": "firstName",
105+
}}
106+
/>
107+
</Grid>
108+
<Grid item xs={6}>
109+
<TextField
110+
id="lastName"
111+
name="lastName"
112+
value={lastName}
113+
label={"Last name"}
114+
type="text"
115+
variant="outlined"
116+
required
117+
fullWidth
118+
inputProps={{
119+
onChange: (event) =>
120+
setLastName((event.target as HTMLInputElement).value),
121+
"data-testid": "lastName",
122+
}}
123+
/>
124+
</Grid>
125+
<Grid item xs={12}>
126+
<TextField
127+
id="email"
128+
name="email"
129+
value={email}
130+
label={"Email address"}
131+
type="text"
132+
variant="outlined"
133+
required
134+
fullWidth
135+
inputProps={{
136+
onChange: (event) =>
137+
setEmail((event.target as HTMLInputElement).value),
138+
"data-testid": "email",
139+
}}
140+
/>
141+
</Grid>
178142
</Grid>
179-
</Grid>
180-
</CardContent>
181-
<CardActions>
182-
<Grid container justify="center">
183-
<Grid item>
184-
<Button
185-
type="submit"
186-
color="primary"
187-
variant="outlined"
188-
data-testid="submit"
189-
>
190-
Update
191-
</Button>
143+
</CardContent>
144+
<CardActions>
145+
<Grid container justify="center">
146+
<Grid item>
147+
<Button
148+
type="submit"
149+
color="primary"
150+
variant="outlined"
151+
data-testid="submit"
152+
>
153+
Update
154+
</Button>
155+
</Grid>
192156
</Grid>
193-
</Grid>
194-
</CardActions>
195-
</Card>
196-
</form>
157+
</CardActions>
158+
</Card>
159+
</form>
160+
</Grid>
161+
<Grid item>
162+
<form onSubmit={handlePasswordUpdateSubmit}>
163+
<Card variant="outlined">
164+
<CardContent>
165+
<Grid container spacing={2}>
166+
<Grid item xs={12}>
167+
<TextField
168+
id="password"
169+
name="password"
170+
value={password}
171+
label={"New password"}
172+
type="password"
173+
variant="outlined"
174+
required
175+
fullWidth
176+
inputProps={{
177+
onChange: (event) =>
178+
setPassword((event.target as HTMLInputElement).value),
179+
"data-testid": "password",
180+
}}
181+
/>
182+
</Grid>
183+
</Grid>
184+
</CardContent>
185+
<CardActions>
186+
<Grid container justify="center">
187+
<Grid item>
188+
<Button
189+
type="submit"
190+
color="primary"
191+
variant="outlined"
192+
data-testid="submit"
193+
>
194+
Update
195+
</Button>
196+
</Grid>
197+
</Grid>
198+
</CardActions>
199+
</Card>
200+
</form>
201+
</Grid>
197202
</Grid>
198-
</Grid>
203+
</Box>
199204
);
200205
};
201206

0 commit comments

Comments
 (0)