Skip to content

Commit

Permalink
moved icon extension to constant
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardomcv committed Jul 21, 2020
1 parent f7c6a46 commit e304b3d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/DataSection/DataSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import useOpenWeatherQuery from '../../hooks/useOpenWeather';
import './DataSection.css';
import { OPEN_WEATHER_ICONS_ENDPOINT } from '../../config';

const ICON_EXTENSION = '@2x.png';

interface DataSectionProps {
selectedLocation: Location;
selectedTemperatureUnit: TemperatureUnit;
Expand Down Expand Up @@ -56,7 +58,7 @@ const DataSection: FunctionComponent<DataSectionProps> = ({
<img
className="weather-icon"
alt="weather-icon"
src={`${OPEN_WEATHER_ICONS_ENDPOINT}${weatherIcon}@2x.png`}
src={`${OPEN_WEATHER_ICONS_ENDPOINT}${weatherIcon}${ICON_EXTENSION}`}
/>
</div>
<div className="day-cycle">
Expand Down

0 comments on commit e304b3d

Please sign in to comment.