diff --git a/.gitignore b/.gitignore index 8f322f0..9b1913e 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ yarn-debug.log* yarn-error.log* # local env files +.env .env*.local # vercel diff --git a/src/api/api.ts b/src/api/api.ts new file mode 100644 index 0000000..1ae9e7c --- /dev/null +++ b/src/api/api.ts @@ -0,0 +1,9 @@ +export const getCurrentLoaction = async ( + latitude: string, + longitude: string +) => { + const res = await fetch( + `http://localhost:8080?latitude=${latitude}&longitude=${longitude}` + ); + return res.json(); +}; diff --git a/src/components/search/Input.tsx b/src/components/search/Input.tsx new file mode 100644 index 0000000..27a24fd --- /dev/null +++ b/src/components/search/Input.tsx @@ -0,0 +1,19 @@ +import { styled } from 'styled-components'; + +const Input = ({ defaultLocation }: { defaultLocation: string }) => { + return ( +