Skip to content

Commit fb4d18e

Browse files
authored
Merge branch 'master' into chore/landing-page
2 parents a576038 + 87ee8f7 commit fb4d18e

10 files changed

Lines changed: 224 additions & 12965 deletions

File tree

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,21 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6+
"@hookform/resolvers": "^0.1.0",
67
"@testing-library/jest-dom": "^5.11.4",
78
"@testing-library/react": "^11.1.0",
89
"@testing-library/user-event": "^12.1.10",
910
"firebase": "^8.3.2",
1011
"mapbox-gl": "^2.1.1",
12+
"postcss-loader": "^5.2.0",
1113
"react": "^17.0.1",
1214
"react-dom": "^17.0.1",
15+
"react-hook-form": "^6.15.5",
1316
"react-router-dom": "^5.2.0",
1417
"react-scripts": "4.0.3",
1518
"web-vitals": "^1.0.1",
16-
"worker-loader": "^3.0.7"
19+
"worker-loader": "^3.0.7",
20+
"yup": "^0.32.9"
1721
},
1822
"scripts": {
1923
"start": "npm run build:css && react-scripts start",

src/components/About.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import React from 'react';
22
import Header from "../components/Header";
3+
import Nature from "../images/coconut.jpg";
34

45
const About = () => {
56
return (
67
<div className="w-full flex flex-col h-screen bg-gray-300 bg-gradient-to-b from-gray-100 to-gray-200">
78
<Header title="Pothole App" />
89
<div className=" flex-col w-full bg-white h-2/6">
9-
<img className="object-cover h-full w-full" src="https://backroads-web.s3.amazonaws.com/images/trips/2016/slideshows/browser/MYTC-yellowstone-tetons-multisport-tour.jpg" alt="nature" />
10+
<img className="object-cover h-full w-full" src={Nature} alt="nature" />
1011
</div>
1112
<div className="flex items-center justify-center h-screen ">
1213
<div class="bg-white rounded-lg border shadow-lg p-10 w-6/12 absolute inset-x-auto bottom-0 h-5/6 ">

src/components/Header.js

Lines changed: 30 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from "react";
22
import { useHistory } from "react-router-dom";
33
import { useAuth } from "../auth/Auth";
44

5-
const Header = ({ title }) => {
5+
const Header = () => {
66
const { currentUser, logout } = useAuth();
77
const history = useHistory();
88

@@ -21,33 +21,33 @@ const Header = ({ title }) => {
2121

2222
return (
2323
<div className="App">
24-
{currentUser ? (
25-
<nav className="bg-gray-800">
26-
<div className="container-xl mx-auto px-2 sm:px-6 lg:px-8">
27-
<div className="relative flex items-center justify-between h-16">
28-
<div className="flex-1 flex items-center justify-center sm:items-stretch sm:justify-start">
29-
<div className="flex-shrink-0 flex items-center">
30-
<h1 className="text-white text-2xl font-bold leading-none w-auto">
31-
{title}
32-
</h1>
33-
</div>
34-
<div className="hidden sm:block sm:ml-8">
35-
<div className="flex space-x-4">
36-
<a
37-
className="bg-gray-900 text-white px-3 py-2 rounded-md text-sm font-medium"
38-
href="/"
39-
>
40-
Home
41-
</a>
42-
<a
43-
className="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium"
44-
href="/about"
45-
>
46-
About
47-
</a>
48-
</div>
24+
<nav className="bg-gray-800">
25+
<div className="container-xl mx-auto px-2 sm:px-6 lg:px-8">
26+
<div className="relative flex items-center justify-between h-16">
27+
<div className="flex-1 flex items-center justify-center sm:items-stretch sm:justify-start">
28+
<div className="flex-shrink-0 flex items-center">
29+
<h1 className="text-white text-2xl font-bold leading-none w-auto">
30+
Road Side Report
31+
</h1>
32+
</div>
33+
<div className="hidden sm:block sm:ml-8">
34+
<div className="flex space-x-4">
35+
<a
36+
className="text-gray-300 px-3 py-2 rounded-md text-sm font-medium"
37+
href="/"
38+
>
39+
Home
40+
</a>
41+
<a
42+
className="text-gray-300 px-3 py-2 rounded-md text-sm font-medium"
43+
href="/about"
44+
>
45+
About
46+
</a>
4947
</div>
5048
</div>
49+
</div>
50+
{currentUser ? (
5151
<div className="dropdown relative ml-3">
5252
<div>
5353
<img
@@ -76,30 +76,17 @@ const Header = ({ title }) => {
7676
</ul>
7777
</div>
7878
</div>
79-
</div>
80-
</div>
81-
</nav>
82-
) : (
83-
<nav className="bg-gray-800">
84-
<div className="container-xl mx-auto px-2 sm:px-6 lg:px-8">
85-
<div className="relative flex items-center justify-between h-16">
86-
<div className="flex-1 flex items-center justify-center sm:items-stretch sm:justify-start">
87-
<div className="flex-shrink-0 flex items-center">
88-
<h1 className="text-white text-2xl font-bold leading-none w-auto">
89-
{title}
90-
</h1>
91-
</div>
92-
</div>
79+
) : (
9380
<button
9481
className="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 border border-blue-700 rounded"
9582
onClick={handleSignIn}
9683
>
9784
Sign In
9885
</button>
99-
</div>
86+
)}
10087
</div>
101-
</nav>
102-
)}
88+
</div>
89+
</nav>
10390
</div>
10491
);
10592
};

src/components/Map.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ const Map = () => {
6464
) // add popup
6565
.setLngLat([point.Longitude, point.Latitude])
6666
.addTo(map);
67-
6867
setpop(popup)
68+
6969
});
7070

7171
return () => ref();

0 commit comments

Comments
 (0)