diff --git a/notes.md b/notes.md new file mode 100644 index 0000000..99965dd --- /dev/null +++ b/notes.md @@ -0,0 +1,8 @@ +I have to make 2 components, the + - City Function + - ZipSearch Function + +Okay, so we are supposed to get the data from the api end point when you type in the information, so like +https://ctp-zip-code-api.onrender.com/zip/11421 -- should give us all the information that we need to build the city function. + +But for now, my problem is how am I supposed to get that data from the api endpoint in the zipsearch function. \ No newline at end of file diff --git a/src/App.css b/src/App.css index c7f4da8..6b75a4b 100644 --- a/src/App.css +++ b/src/App.css @@ -1,6 +1,69 @@ .App-header { - background-color: #222; - padding: 20px; - color: white; - text-align: center; + background-color: #222; + padding: 20px; + color: white; + text-align: center; +} + +.App-header h1 { + font-weight: 500; +} + +.form-control { + display: block; + width: 100%; + padding: 0.5rem; + font-size: 1rem; + border: 1px solid #ccc; + border-radius: 4px; + font-weight: 400; + line-height: 1.5; + color: #212529; + background-color: #fff; + background-clip: padding-box; + border: 1px solid #ced4da; + border-radius: 0.375rem; + transition: + border-color 0.15s ease-in-out, + box-shadow 0.15s ease-in-out; + margin-bottom: 1rem; +} + +/* Zip Code */ + +.zip-code-label { + border-radius: 5rem; + font-weight: 400; + font-size: 1rem; +} + +/* City Display */ + +.city { + border: rgb(46, 45, 45) 1px solid; + margin-top: 1rem; + border-radius: 5px; + margin-bottom: 1rem; + overflow: hidden; +} + +.city-header { + background-color: rgb(236, 234, 234); + padding: 0.5rem 1rem; + font-weight: 500; + border-bottom: 1px solid black; +} + +.city-body { + padding: 1rem; +} + +.city-body ul { + list-style-type: none; + padding: 0; + margin: 0; +} + +.city-body li { + margin-bottom: 0.5rem; } diff --git a/src/App.jsx b/src/App.jsx index 6478b09..035507d 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,12 +1,63 @@ -import { useState } from "react"; +import { useState, useEffect } from "react"; import "./App.css"; -function City(props) { - return
{cityData.LocationText}
+Zip Code: