Skip to content

Commit

Permalink
revert(#d47b0f6): toast on empty lines
Browse files Browse the repository at this point in the history
This reverts commit d47b0f6.
  • Loading branch information
lindtvedtsebastian committed Jun 10, 2024
1 parent d47b0f6 commit 7e5aea0
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ import { deleteTile, getOrganizationForBoard, saveTile } from './actions'
import { useLines } from './useLines'
import { sortLineByPublicCode } from './utils'
import { TransportModeAndLines } from './TransportModeAndLines'
import { useToast } from '@entur/alert'

function TileCard({ bid, tile }: { bid: TBoardID; tile: TTile }) {
const posthog = usePostHog()
const toast = useToast()
const [isOpen, setIsOpen] = useState(false)
const [changed, setChanged] = useState(false)
const [confirmOpen, setConfirmOpen] = useState(false)
Expand Down Expand Up @@ -155,12 +153,6 @@ function TileCard({ bid, tile }: { bid: TBoardID; tile: TTile }) {
),
)
}
if (!lines || lines.length === 0)
toast.addToast({
title: 'Ingen linjer valgt',
content: 'Du må velge minst én linje.',
variant: 'info',
})
saveTile(bid, newTile)
}}
onSubmit={reset}
Expand Down

0 comments on commit 7e5aea0

Please sign in to comment.