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;
|
||||
`;
|
||||
|
||||
/*
|
||||
const FindIpButton = styled.a`
|
||||
margin: 0.5rem;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
text-align: center;
|
||||
color: ${colors.primary};
|
||||
text-decoration: underline;
|
||||
`;
|
||||
*/
|
||||
// const FindIpButton = styled.a`
|
||||
// margin: 0.5rem;
|
||||
// cursor: pointer;
|
||||
// display: block;
|
||||
// text-align: center;
|
||||
// color: ${colors.primary};
|
||||
// text-decoration: underline;
|
||||
// `;
|
||||
|
||||
const ErrorMessage = styled.p`
|
||||
color: ${colors.danger};
|
||||
@ -131,25 +129,22 @@ const Home = (): JSX.Element => {
|
||||
if (!isError) setErrMsg('');
|
||||
};
|
||||
|
||||
|
||||
// eslint-disable-next-line
|
||||
const findIpAddress = () => {
|
||||
setUserInput('');
|
||||
setPlaceholder('Looking up your IP...');
|
||||
setInputDisabled(true);
|
||||
fetch('https://ipapi.co/json/')
|
||||
.then(function(response) {
|
||||
response.json().then(jsonData => {
|
||||
setUserInput(jsonData.ip);
|
||||
setPlaceholder(defaultPlaceholder);
|
||||
setInputDisabled(true);
|
||||
});
|
||||
})
|
||||
.catch(function(error) {
|
||||
console.log('Failed to get IP address :\'(', error)
|
||||
});
|
||||
};
|
||||
|
||||
// const findIpAddress = () => {
|
||||
// setUserInput('');
|
||||
// setPlaceholder('Looking up your IP...');
|
||||
// setInputDisabled(true);
|
||||
// fetch('https://ipapi.co/json/')
|
||||
// .then(function(response) {
|
||||
// response.json().then(jsonData => {
|
||||
// setUserInput(jsonData.ip);
|
||||
// setPlaceholder(defaultPlaceholder);
|
||||
// setInputDisabled(true);
|
||||
// });
|
||||
// })
|
||||
// .catch(function(error) {
|
||||
// console.log('Failed to get IP address :\'(', error)
|
||||
// });
|
||||
// };
|
||||
|
||||
const formSubmitEvent = (event: FormEvent<HTMLFormElement>) => {
|
||||
event.preventDefault();
|
||||
|
Loading…
Reference in New Issue
Block a user