Remove isDynamic from modal.hamlet & minor cleanup
This commit is contained in:
parent
1dc322aeac
commit
f4ed279a15
@ -7,7 +7,6 @@ module Utils.Modal
|
||||
import ClassyPrelude.Yesod
|
||||
|
||||
import Control.Lens
|
||||
import Control.Lens.Extras (is)
|
||||
import Utils.Route
|
||||
|
||||
import Settings (widgetFile)
|
||||
@ -22,12 +21,11 @@ data Modal site = Modal
|
||||
|
||||
customModal :: Modal site -> WidgetT site IO ()
|
||||
customModal Modal{..} = do
|
||||
let isDynamic = is _Left modalContent
|
||||
triggerId' <- maybe newIdent return modalTriggerId
|
||||
|
||||
$(widgetFile "widgets/modal/modal")
|
||||
|
||||
route <- for (modalContent ^? _Left) toTextUrl
|
||||
route <- traverse toTextUrl $ modalContent ^? _Left
|
||||
modalTrigger route triggerId'
|
||||
|
||||
-- | Create a link to a modal
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
$newline never
|
||||
<div uw-modal data-modal-trigger=##{triggerId'} data-modal-closeable :isDynamic:.not-used>
|
||||
<div uw-modal data-modal-trigger=##{triggerId'} data-modal-closeable>
|
||||
$case modalContent
|
||||
$of Right content
|
||||
<div .modal__content>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user