mirror of
https://github.com/Lissy93/web-check.git
synced 2025-04-30 12:24:27 +02:00
Merge pull request #19 from abhishekMuge/master
Issue #16: Eslint unused variable issue removed
This commit is contained in:
commit
98a3243846
@ -38,16 +38,14 @@ const UserInputMain = styled.form`
|
|||||||
z-index: 2;
|
z-index: 2;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
/*
|
// const FindIpButton = styled.a`
|
||||||
const FindIpButton = styled.a`
|
// margin: 0.5rem;
|
||||||
margin: 0.5rem;
|
// cursor: pointer;
|
||||||
cursor: pointer;
|
// display: block;
|
||||||
display: block;
|
// text-align: center;
|
||||||
text-align: center;
|
// color: ${colors.primary};
|
||||||
color: ${colors.primary};
|
// text-decoration: underline;
|
||||||
text-decoration: underline;
|
// `;
|
||||||
`;
|
|
||||||
*/
|
|
||||||
|
|
||||||
const ErrorMessage = styled.p`
|
const ErrorMessage = styled.p`
|
||||||
color: ${colors.danger};
|
color: ${colors.danger};
|
||||||
@ -131,25 +129,22 @@ const Home = (): JSX.Element => {
|
|||||||
if (!isError) setErrMsg('');
|
if (!isError) setErrMsg('');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// const findIpAddress = () => {
|
||||||
// eslint-disable-next-line
|
// setUserInput('');
|
||||||
const findIpAddress = () => {
|
// setPlaceholder('Looking up your IP...');
|
||||||
setUserInput('');
|
// setInputDisabled(true);
|
||||||
setPlaceholder('Looking up your IP...');
|
// fetch('https://ipapi.co/json/')
|
||||||
setInputDisabled(true);
|
// .then(function(response) {
|
||||||
fetch('https://ipapi.co/json/')
|
// response.json().then(jsonData => {
|
||||||
.then(function(response) {
|
// setUserInput(jsonData.ip);
|
||||||
response.json().then(jsonData => {
|
// setPlaceholder(defaultPlaceholder);
|
||||||
setUserInput(jsonData.ip);
|
// setInputDisabled(true);
|
||||||
setPlaceholder(defaultPlaceholder);
|
// });
|
||||||
setInputDisabled(true);
|
// })
|
||||||
});
|
// .catch(function(error) {
|
||||||
})
|
// console.log('Failed to get IP address :\'(', error)
|
||||||
.catch(function(error) {
|
// });
|
||||||
console.log('Failed to get IP address :\'(', error)
|
// };
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
const formSubmitEvent = (event: FormEvent<HTMLFormElement>) => {
|
const formSubmitEvent = (event: FormEvent<HTMLFormElement>) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
Loading…
Reference in New Issue
Block a user