Skip to content

Instantly share code, notes, and snippets.

@amitaibu
Last active September 30, 2021 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amitaibu/fdd88059d4e4e955899b3cec6b0b8c3f to your computer and use it in GitHub Desktop.
Save amitaibu/fdd88059d4e4e955899b3cec6b0b8c3f to your computer and use it in GitHub Desktop.
action CreateBidAction = do
let bid = newRecord @Bid
bid
|> buildBid
>>= ifValid \case
Left bid -> render NewView { .. }
Right bid -> do
bid <- bid |> createRecord
_ <- forkIO $ do
-- How can Auto refresh get triggered about this new record?
newBid <- newRecord @Bid |> createRecord
pure ()
setSuccessMessage "Bid created"
redirectTo (ShowBidAction (get #id bid))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment