jacekschae / learn-re-frame-course-files

:cinema: Learn re-frame course files for building Cheffy app
https://www.learnreframe.com/
57 stars 43 forks source link

in video 07-nav, the nav bar doesn't show up the first time it's supposed to. #8

Closed ghost closed 2 years ago

ghost commented 4 years ago

I'm talking about timestamp 6:38.

I even swapped out with the correct code in the repo and it still doesn't work. There are no errors either in the console or on the screen or in the build.

This is my core.cljs

(ns app.core
  (:require [reagent.core :as r]
            [re-frame.core :as rf]
            [app.db]
            [app.nav.views.nav :refer [nav]]
            [app.theme :refer [cheffy-theme]]
            ["@smooth-ui/core-sc" :refer [Normalize ThemeProvider Button]]))

(defn app
  []
  [:<>
   [:> Normalize]
   [:> ThemeProvider {:theme cheffy-theme}
    [nav]]])

(defn ^:dev/after-load start
  []
  (rf/dispatch-sync [:initialize-db])
  (r/render [app]
    (.getElementById js/document "app")))

(defn ^:export init
  []
  (start))
jacekschae commented 4 years ago

Hi there,

Thanks for the issue.

I think the problem is in app.nav.views.nav

(ns app.nav.views.nav
  (:require [app.nav.views.authenticated :refer [authenticated]]))

(defn nav
  []
  (let [user true]
    (if user
      [authenticated] ; <-- make sure this is authenticated and not a string
      "public")))
jacekschae commented 4 years ago

@tiotolstoy could we close this one?

jacekschae commented 2 years ago

Stale