-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Das
committed
Aug 15, 2020
1 parent
2ac78d5
commit 6a44fed
Showing
9 changed files
with
187 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.footer { | ||
/* position: fixed; */ | ||
display: flex; | ||
/* justify-content: space-between; */ | ||
align-items: center; | ||
background-color: rgb(0, 8, 59); | ||
/* z-index: 99; */ | ||
height: 40px; | ||
} | ||
|
||
.footer__texts { | ||
align-items: center; | ||
display: flex; | ||
/* width: 50%; */ | ||
margin-left: 10px; | ||
} | ||
|
||
.footer__texts > h1, | ||
a { | ||
font-size: 10px; | ||
font-weight: 500; | ||
margin-left: 5px; | ||
color: rgba(240, 240, 240); | ||
} | ||
|
||
.footer_social { | ||
display: flex; | ||
width: 100px; | ||
color: white !important; | ||
justify-content: space-evenly; | ||
margin-right: 20px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React from "react"; | ||
import "./Footer.css"; | ||
import TwitterIcon from "@material-ui/icons/Twitter"; | ||
import GitHubIcon from "@material-ui/icons/GitHub"; | ||
import LinkedInIcon from "@material-ui/icons/LinkedIn"; | ||
|
||
function Footer() { | ||
return ( | ||
<div className="footer"> | ||
<div className="footer__texts"> | ||
<h1 className="footer__appname"> | ||
Country Capital Currency Flag (C3F) || | ||
</h1> | ||
<a | ||
href={"https://www.linkedin.com/in/swarnendu-das-41479531/"} | ||
target="_blank" | ||
> | ||
© Swarnendu Das || | ||
</a> | ||
<h1 className="footer__disclaimer">Disclaimer ||</h1> | ||
<h1 className="footer__privacypolicy">Privacy Policy ||</h1> | ||
<h1 className="footer__sitemap">Sitemap ||</h1> | ||
</div> | ||
<div className="footer_social"> | ||
<a | ||
href={"https://www.linkedin.com/in/swarnendu-das-41479531/"} | ||
target="_blank" | ||
> | ||
<LinkedInIcon fontSize="small" /> | ||
</a> | ||
<GitHubIcon fontSize="small" /> | ||
<a href={"https://twitter.com/SwarnenduDasgm1"} target="_blank"> | ||
<TwitterIcon fontSize="small" /> | ||
</a> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default Footer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
|
||
.nav__black { | ||
background-color: rgb(27, 27, 27); | ||
/* opacity: 85%; */ | ||
opacity: 85%; | ||
} | ||
|
||
.nav__logo { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,16 @@ | ||
import React, { useEffect, useState } from "react"; | ||
/** | ||
* Rest API to fetch data | ||
* | ||
*/ | ||
|
||
const base_url = "https://restcountries.eu/rest/v2/"; | ||
const url_all = "https://restcountries.eu/rest/v2/all"; | ||
const url_country = "https://restcountries.eu/rest/v2/name/ia"; | ||
import { useState } from "react"; | ||
|
||
function Requestapi() { | ||
const [error, setError] = useState(null); | ||
const [isLoaded, setIsLoaded] = useState(false); | ||
const [items, setItems] = useState([]); | ||
|
||
// Note: the empty deps array [] means | ||
// this useEffect will run once | ||
// similar to componentDidMount() | ||
useEffect(() => { | ||
fetch(url_country) | ||
.then((res) => res.json()) | ||
.then( | ||
(result) => { | ||
setIsLoaded(true); | ||
setItems(result); | ||
}, | ||
// Note: it's important to handle errors here | ||
// instead of a catch() block so that we don't swallow | ||
// exceptions from actual bugs in components. | ||
(error) => { | ||
setIsLoaded(true); | ||
setError(error); | ||
} | ||
); | ||
}, []); | ||
|
||
return items; | ||
/* | ||
if (error) { | ||
return <div>Error: {error.message}</div>; | ||
} else if (!isLoaded) { | ||
return <div>Loading...</div>; | ||
} else { | ||
return ( | ||
<div>{console.log("RequestApi --> ", { items })}</div> | ||
// <ul> | ||
// {items.map((item) => ( | ||
// <li key={item.name}>{item.name}</li> | ||
// ))} | ||
// </ul> | ||
); | ||
} | ||
*/ | ||
} | ||
|
||
export default Requestapi; | ||
export const requestapi = (url) => { | ||
const [apiReturn, setApiReturn] = useState({ data: null, loading: true }); | ||
fetch(url) | ||
.then((response) => response.json()) | ||
.then((y) => { | ||
setApiReturn({ data: y, loading: false }); | ||
}); | ||
return apiReturn; | ||
}; |