keechma

Keechma stack. Mention @U050986L9 or @U2J1PHYNM if you have any questions
sooheon 2018-04-24T00:49:25.000257Z

@mihaelkonjevic I’m looking at the redirect mechanism here: https://github.com/gothinkster/clojurescript-keechma-realworld-example-app/blob/master/src/cljs/realworld/controllers/redirect.cljs Is there any way to pp/redirect! to a different domain? I.e. pass it a full-on URL, not just params

sooheon 2018-04-24T00:51:58.000168Z

I guess I can just do plain js. Is something like this OK?

(defn redirect! [route app-db]
  (let [redirect-to (get-redirect route app-db)]
    (when redirect-to
      (if (= redirect-to ::some-other-site)
        (.assign js/window.location "<http://other-site.url>")
        (pl/redirect! redirect-to)))))

mihaelkonjevic 2018-04-24T06:00:18.000054Z

@sooheon just use plain js. Redirect will use it under the hood after it constructs the url from the passed map

mihaelkonjevic 2018-04-24T17:46:08.000122Z

https://twitter.com/mihaelkonjevic/status/988836278845222914

❤️ 1