Commit 6cb8bec4 authored by Alexandre Delanoë's avatar Alexandre Delanoë

Merge remote-tracking branch 'origin/698-dev-ws-host-fix' into dev

parents 1f3449f5 ade52a93
......@@ -15,7 +15,7 @@ import Gargantext.Hooks.FirstEffect (useFirstEffect')
import Gargantext.Router as Router
import Gargantext.Sessions as Sessions
import Gargantext.Types (CacheParams, defaultCacheParams)
import Gargantext.Utils (getter)
import Gargantext.Utils (getter, host)
import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix.Utils as RU
......@@ -110,7 +110,8 @@ mainAppCpt = here.component "main" cpt where
let session = Seq.head sessions
-- here.log2 "[mainApp] sessions" sessions'
wsProto <- Notifications.wsProtocol
Notifications.connect ws (wsProto <> "://localhost:8008/ws") session
h <- host
Notifications.connect ws (wsProto <> "://" <> h <> "/ws") session
-- T.write_ ws boxes.wsNotification
-- NOTE: Dummy subscription
-- let action = NotificationsT.InsertCallback (NotificationsT.UpdateTree (-1)) "some-uuid" (\_ -> here.log "callback!")
......
......@@ -112,6 +112,8 @@ href = location >>= WHL.href
protocol :: Effect String
protocol = location >>= WHL.protocol
host :: Effect String
host = location >>= WHL.host
nbsp :: Int -> String
nbsp = nbsp' ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment