Skip to content

Commit

Permalink
Refactor DayCard component to remove unnecessary null coalescing oper…
Browse files Browse the repository at this point in the history
…ator
  • Loading branch information
Duckiduc committed Oct 14, 2024
1 parent 2ca3a77 commit 13117bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/src/components/DayCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function DayCard({ currentClock, mid, weatherData }: DayCardProps): JSX.E
const hours = isAM ? weatherData.days[0].hours.slice(0, 12) : weatherData.days[0].hours.slice(12)

const shift = weatherData.tzoffset > 0 ? `+${weatherData.tzoffset}` : weatherData.tzoffset
const currentClockTz = (currentClock?.hour ?? 0) + weatherData.tzoffset ?? 0
const currentClockTz = (currentClock?.hour ?? 0) + weatherData.tzoffset

return (
<div className="card">
Expand Down

0 comments on commit 13117bc

Please sign in to comment.