Skip to content

Commit

Permalink
styling(board): illustration when no departures (#1525)
Browse files Browse the repository at this point in the history
* styling(board): illustration when no departures

* styling(board): justify center

* styling(board): image size
  • Loading branch information
oyvindgrutle authored May 29, 2024
1 parent 179619d commit 3669281
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion next-tavla/src/Board/scenarios/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import { AimedTime } from './components/Time/AimedTime'
import { ArrivalTime } from './components/Time/ArrivalTime'
import { Platform } from './components/Platform'
import { ExpectedTime } from './components/Time/ExpectedTime'
import { Deviation } from './components/Deviation'
import { Line } from './components/Line'
import { StopPlaceDeviation } from './components/StopPlaceDeviation'
import Image from 'next/image'
import leafs from 'assets/illustrations/Leafs.png'

function Table({
departures,
Expand All @@ -30,6 +31,18 @@ function Table({
</div>
)

if (departures.length === 0)
return (
<div className="flex flex-col items-center justify-center text-center h-full w-full text-em-sm">
<Image
src={leafs}
alt=""
className="h-[15em] w-[15em] aspect-square"
/>
Ingen avganger de neste 24 timene.
</div>
)

return (
<div className="flex flex-col">
<StopPlaceDeviation situations={situations} />
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3669281

Please sign in to comment.