Skip to content

Commit

Permalink
hotfix of converting military time to standard time
Browse files Browse the repository at this point in the history
  • Loading branch information
WesloTheWeb committed Aug 21, 2022
1 parent a5215b0 commit 2223a40
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"lint": "next lint"
},
"dependencies": {
"convert-time": "^0.3.0",
"next": "12.0.3",
"react": "17.0.2",
"react-dom": "17.0.2"
Expand Down
7 changes: 2 additions & 5 deletions src/containers/ForeCast/ForeCast.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ import UpcomingForeCastCard from '../../components/UpcomingForceCastCard/Upcomin
import HourlyCard from '../../components/HourlyCard/HourlyCard';

const { forecastContainer, upcomingGrid } = classes;

const convertTime = (time) => {
return time.slice(10)
};
var convertTime = require('convert-time');

const ForeCast = () => {

Expand Down Expand Up @@ -43,7 +40,7 @@ const ForeCast = () => {
/>
<div className='text-center information-block'>
<h3 >Hourly Breakdown</h3>
<p>Below is the breakdown of the weather today in military time.</p>
<p>Below is the breakdown of the weather today.</p>
</div>
<div className={upcomingGrid}>
{weather.forecast.forecastday[0].hour.map((currentDay, idx) => {
Expand Down

0 comments on commit 2223a40

Please sign in to comment.