From 0ab47c5029791c758d6bd16ff7176c7410fdd953 Mon Sep 17 00:00:00 2001 From: Saskia Lindner Date: Thu, 21 Sep 2017 11:46:16 +0200 Subject: [PATCH] Refactor naming for render state tab --- src/day8/re_frame/trace.cljs | 2 +- src/day8/re_frame/trace/app_state.cljs | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/day8/re_frame/trace.cljs b/src/day8/re_frame/trace.cljs index d6dd186..b319aee 100644 --- a/src/day8/re_frame/trace.cljs +++ b/src/day8/re_frame/trace.cljs @@ -402,7 +402,7 @@ :traces [render-trace-panel] :subvis [subvis/render-subvis traces [:div.panel-content-scrollable]] - :app-state [app-state/tab @db/app-db])]]]))}))) + :app-state [app-state/render-state db/app-db])]]]))}))) (defn panel-div [] (let [id "--re-frame-trace--" panel (.getElementById js/document id)] diff --git a/src/day8/re_frame/trace/app_state.cljs b/src/day8/re_frame/trace/app_state.cljs index 6e5b919..77173b2 100644 --- a/src/day8/re_frame/trace/app_state.cljs +++ b/src/day8/re_frame/trace/app_state.cljs @@ -1,9 +1,7 @@ (ns day8.re-frame.trace.app-state (:require [reagent.core :as r] [clojure.string :as str] - [devtools.formatters.core :as cljs-devtools] - - [cljs.pprint :refer [pprint]])) + [devtools.formatters.core :as cljs-devtools])) (defn string->css [css-string] (->> (str/split (get css-string "style") #";") @@ -45,7 +43,7 @@ :else jsonml)))) -(defn tab [data] +(defn render-state [data] [:div {:style {:flex "1 0 auto" :width "100%" :height "100%" :display "flex" :flex-direction "column"}} [:div.panel-content-scrollable - (jsonml->hiccup (cljs-devtools/header-api-call data))]]) + (jsonml->hiccup (cljs-devtools/header-api-call @data))]])