This commit is contained in:
parent
83b337db03
commit
9745332ad9
@ -17,7 +17,7 @@ export default function Home() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<main>
|
<main>
|
||||||
<div className='mx-auto max-w-xs sm:max-w-md md:max-w-xl text-center'>
|
<div className='mx-auto max-w-xs sm:max-w-md md:max-w-3xl text-center'>
|
||||||
<LocationContext.Provider value={contextValue}>
|
<LocationContext.Provider value={contextValue}>
|
||||||
<LocationSearch />
|
<LocationSearch />
|
||||||
<WeatherNow />
|
<WeatherNow />
|
||||||
|
@ -4,7 +4,7 @@ import DailyCard from "./DailyCard";
|
|||||||
export default function CardContainer(props: {weather: Forecast}) {
|
export default function CardContainer(props: {weather: Forecast}) {
|
||||||
const weather = props.weather;
|
const weather = props.weather;
|
||||||
return (
|
return (
|
||||||
<div className="flex overflow-scroll justify-center">
|
<div className="p-2 flex overflow-scroll md:justify-center w-full">
|
||||||
{weather.daily && weather.daily.apparent_temperature_max.map((temp, index) => (
|
{weather.daily && weather.daily.apparent_temperature_max.map((temp, index) => (
|
||||||
index > 0 &&
|
index > 0 &&
|
||||||
index < 7 && // Ensure we only render the next 6 days
|
index < 7 && // Ensure we only render the next 6 days
|
||||||
|
@ -8,7 +8,7 @@ export default function DailyCard(props: DailyCardPropType) {
|
|||||||
const weatherCode = props.weatherCode
|
const weatherCode = props.weatherCode
|
||||||
const temperature = props.temperature
|
const temperature = props.temperature
|
||||||
return (
|
return (
|
||||||
<div className="m-1 p-2 text-center shadow-md border-slate-200 border-2 rounded">
|
<div className="min-w-28 m-1 p-2 text-center shadow-md border-slate-200 border-2 rounded">
|
||||||
<WeatherIcon weatherCode={weatherCode}/>
|
<WeatherIcon weatherCode={weatherCode}/>
|
||||||
<DailyTemp temperature={temperature} />
|
<DailyTemp temperature={temperature} />
|
||||||
<DailyTime time={time} />
|
<DailyTime time={time} />
|
||||||
|
@ -27,7 +27,7 @@ export default function LocationSearch() {
|
|||||||
return (
|
return (
|
||||||
<form onSubmit={handleSubmit}>
|
<form onSubmit={handleSubmit}>
|
||||||
<input
|
<input
|
||||||
className="my-4 w-full rounded h-8 px-2 box-border border-2 hover:shadow-md"
|
className="my-4 w-full rounded h-8 px-2 box-border border-2 hover:shadow-md max-w-md"
|
||||||
id="location"
|
id="location"
|
||||||
name="locationSearch"
|
name="locationSearch"
|
||||||
type="text"
|
type="text"
|
||||||
|
Loading…
Reference in New Issue
Block a user