 (rum/defc userbar < rum/static []
   [:div.user-bar
    (user-avatar)
-   [:span "admin"]
+   [:span (storage/user)]
    (user-menu)])
 
 (rum/defc appbar < rum/reactive []

            [swarmpit.storage :as storage]
            [swarmpit.routes :as routes]
            [swarmpit.component.state :as state]
            [rum.core :as rum]))

(enable-console-print!)


  {:position "fixed"
   :right    20})

(defn user-gravatar-hash [email]
  (let [md5 (Md5.)]
    (.update md5 (string/trim email))
    (crypt/byteArrayToHex (.digest md5))))

(defn- user-avatar []
  (comp/avatar
    {:style user-avatar-style
     :src   (->> (storage/email)
                 (user-gravatar-hash)
                 (str "https://www.gravatar.com/avatar/"))}))

(defn- user-menu-button []
  (comp/icon-button
