summaryrefslogtreecommitdiff
path: root/Biz/Devalloc/Page/Signup.hs
blob: 8debf534368a8d6475632a055567e8ffbece5e89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoImplicitPrelude #-}

module Biz.Devalloc.Page.Signup
  ( Move (..),
    Path,
    Form (..),
    path,
    view,
    host,
  )
where

import Alpha
import Biz.App (HtmlApp (..))
import Miso
import Miso.String
import Servant.API
import Servant.Links
import Servant.Server (Handler)

data Move = NoMove

type Path = View Move

newtype Form = Form
  { uri :: URI
  }

path :: URI
path = linkURI <| safeLink (Proxy :: Proxy Path) (Proxy :: Proxy Path)

host :: Handler (HtmlApp (View Move))
host =
  Form {uri = path}
    |> view
    |> HtmlApp
    |> pure

view :: Form -> View Move
view _ =
  div_
    []
    [ h1_ [] [text "Signup coming soon"],
      p_ [] [a_ [href_ "/"] [text "Go back home"]]
    ]