Last active
September 30, 2021 12:40
-
-
Save amitaibu/fdd88059d4e4e955899b3cec6b0b8c3f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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