Skip to content

Commit

Permalink
Edited read me and improved ui
Browse files Browse the repository at this point in the history
  • Loading branch information
OnuohaOluebube committed Oct 10, 2021
1 parent 889d2e9 commit 662b3cc
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 17 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"axios": "^0.22.0",
"font-awesome": "^4.7.0",
"http-proxy-middleware": "^2.0.1",
"joi-browser": "^13.4.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand Down
8 changes: 8 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import "react-toastify/dist/ReactToastify.css";
import { ToastContainer } from "react-toastify";
import RegForm from "./components/Forms/Registration";
import LoginForm from "./components/Forms/Login";
import endPoints from "./components/services/EndPoints";

function App() {
const [imagesCategories, setImagesCategories] = useState([]);
Expand All @@ -45,6 +46,13 @@ function App() {
setImages([...getImages()]);
}, []);

// const getImages = async () => {
// const images = await endPoints.getImages();
// setImages(images);
// };
// useEffect(getImages, []);
console.log("my images are", images);

const handleSelectedImageCategory = (category) => {
setSelectedImageCategory(category);
};
Expand Down
8 changes: 7 additions & 1 deletion src/components/Common/NavBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,13 @@ const NavBar = ({ loggedIn }) => {
<Button name="Sign Up" />
</Link>
<Link to="/Login">
<p style={{ color: `${navActive ? "black" : "white"}` }}>Login</p>
<p
style={{
color: `${navActive ? "black" : "white"}`,
}}
>
Login
</p>
</Link>
</div>
)}
Expand Down
13 changes: 0 additions & 13 deletions src/components/Forms/Registration.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ const RegForm = () => {
Email Address
</label>
<div className="relative">
<img className="absolute right-0" src="mail-fill.svg" />
<input
className="input"
type="email"
Expand All @@ -77,18 +76,6 @@ const RegForm = () => {
Password
</label>
<div className="relative">
<img
id="show"
className="absolute right-0"
src="eye-off-fill.svg"
onclick="showPassword()"
/>
<img
id="hide"
className="absolute right-0"
src="eye-fill.svg"
onclick="hidePassword()"
/>
<input
className="input"
type="password"
Expand Down
12 changes: 10 additions & 2 deletions src/components/LandingPage/Landing.css
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ header {
display: flex;
gap: 1rem;
}

.nav-sign-up a {
display: flex;
}
.hero {
display: flex;
height: 100%;
Expand Down Expand Up @@ -298,7 +300,13 @@ header {
.signedIn-inputactive {
display: flex;
width: 100%;
padding-left: 1rem;
background: white;
}
:focus {
outline: 0;
}
.nav-sign-up a {
color: black;
}

.hero-right {
Expand Down
11 changes: 11 additions & 0 deletions src/components/services/EndPoints.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Axios from "axios";
const BASE_URL = "https://tranquil-taiga-17656.herokuapp.com/home/add-pictures";

const endPoints = {
getImages: async () => {
const response = await Axios.get(BASE_URL);
return response.data;
},
};

export default endPoints;
37 changes: 36 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1726,6 +1726,13 @@
resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz#3c9ee980f1a10d6021ae6632ca3e79ca2ec4fb50"
integrity sha512-giAlZwstKbmvMk1OO7WXSj4OZ0keXAcl2TQq4LWHiiPH2ByaH7WeUzng+Qej8UPxxv+8lRTuouo0iaNDBuzIBA==

"@types/http-proxy@^1.17.5":
version "1.17.7"
resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.7.tgz#30ea85cc2c868368352a37f0d0d3581e24834c6f"
integrity sha512-9hdj6iXH64tHSLTY+Vt2eYOGzSogC+JQ2H7bdPWkuh7KXP5qLllWx++t+K9Wk556c3dkDdPws/SpMRi0sdCT1w==
dependencies:
"@types/node" "*"

"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1":
version "2.0.3"
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz#4ba8ddb720221f432e443bd5f9117fd22cfd4762"
Expand Down Expand Up @@ -2522,6 +2529,13 @@ axe-core@^4.0.2:
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.1.2.tgz#7cf783331320098bfbef620df3b3c770147bc224"
integrity sha512-V+Nq70NxKhYt89ArVcaNL9FDryB3vQOd+BFXZIfO3RP6rwtj+2yqqqdHEkacutglPaZLkJeuXKCjCJDMGPtPqg==

axios@^0.22.0:
version "0.22.0"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.22.0.tgz#bf702c41fb50fbca4539589d839a077117b79b25"
integrity sha512-Z0U3uhqQeg1oNcihswf4ZD57O3NrR1+ZXhxaROaWpDmsDTx7T2HNBV2ulBtie2hwJptu8UvgnJoK+BIqdzh/1w==
dependencies:
follow-redirects "^1.14.4"

axobject-query@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be"
Expand Down Expand Up @@ -5042,6 +5056,11 @@ follow-redirects@^1.0.0:
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.2.tgz#dd73c8effc12728ba5cf4259d760ea5fb83e3147"
integrity sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA==

follow-redirects@^1.14.4:
version "1.14.4"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.4.tgz#838fdf48a8bbdd79e52ee51fb1c94e3ed98b9379"
integrity sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==

font-awesome@^4.7.0:
version "4.7.0"
resolved "https://registry.yarnpkg.com/font-awesome/-/font-awesome-4.7.0.tgz#8fa8cf0411a1a31afd07b06d2902bb9fc815a133"
Expand Down Expand Up @@ -5615,7 +5634,18 @@ [email protected]:
lodash "^4.17.11"
micromatch "^3.1.10"

http-proxy@^1.17.0:
http-proxy-middleware@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.1.tgz#7ef3417a479fb7666a571e09966c66a39bd2c15f"
integrity sha512-cfaXRVoZxSed/BmkA7SwBVNI9Kj7HFltaE5rqYOub5kWzWZ+gofV2koVN1j2rMW7pEfSSlCHGJ31xmuyFyfLOg==
dependencies:
"@types/http-proxy" "^1.17.5"
http-proxy "^1.18.1"
is-glob "^4.0.1"
is-plain-obj "^3.0.0"
micromatch "^4.0.2"

http-proxy@^1.17.0, http-proxy@^1.18.1:
version "1.18.1"
resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549"
integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==
Expand Down Expand Up @@ -6055,6 +6085,11 @@ is-plain-obj@^1.0.0:
resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4=

is-plain-obj@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-3.0.0.tgz#af6f2ea14ac5a646183a5bbdb5baabbc156ad9d7"
integrity sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==

is-plain-object@^2.0.3, is-plain-object@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
Expand Down

0 comments on commit 662b3cc

Please sign in to comment.