Skip to content

Commit

Permalink
update useImgSelec
Browse files Browse the repository at this point in the history
  • Loading branch information
Bardolog1 committed Aug 7, 2023
1 parent 2bf39f1 commit 0d72c66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/DayWeatherCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const Degree = styled.span`
const DayWeatherCard = ({order, isCelsius, data}) => {

const description = data[0]?.weather[0].description;
const [image] = useImgSelector(description);
const [image] = useImgSelector(description?.toLowerCase());
const min = isCelsius? (data[0]?.main.temp_min - 273.15)?.toFixed(0) : ((data[0].main.temp_min - 273.15) * 9/5 + 32).toFixed(0);
const max = isCelsius? (data[data.length- 1]?.main.temp_max - 273.15)?.toFixed(0) : ((data[data.length- 1].main.temp_max - 273.15) * 9/5 + 32).toFixed(0);
const date = useDateFormatted(data, order);
Expand Down

0 comments on commit 0d72c66

Please sign in to comment.