File tree 1 file changed +9
-5
lines changed
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 332
332
333
333
(if-let [saved-participant (if (= status 200 ) (:body response))]
334
334
335
- (om/transact! app-state :participants #(conj % saved-participant)))))
335
+ (do
336
+ (om/transact! app-state :participants #(conj % saved-participant))
337
+ (om/transact! app-state :vote-saved-this-session (fn [_] true ))))))
336
338
337
339
(recur ))))))
338
340
339
341
340
342
(render-state [this state]
341
343
342
- (ddom/div {:className " vote-component" }
344
+ (ddom/div {:className " vote-component"
345
+ :style (display (not (:vote-saved-this-session app-state)))}
343
346
(ddom/h2 " Vote on the options" )
344
347
(ddom/p " Use the sliders to express your preferences." )
345
348
(ddom/div {:className " row form-group" }
454
457
455
458
(defn get-existing-event [cloodle-code output-channel]
456
459
(go
457
- (let [response (<! (http/get (str " api/event/" cloodle-code)))
458
- status (:status response)]
460
+ (let [response (<! (http/get (str " api/event/" cloodle-code)))]
459
461
(print (str " GOT FROM SERVER " (:body response)))
460
462
(let [event (:body response)
461
463
462
464
new-event (merge event {:new-participant { :name " "
463
465
:selections {}
464
466
}
467
+ :vote-saved-this-session false
465
468
})]
466
469
467
470
(put! output-channel new-event)))))
487
490
{:name " Conan The Barbarian" }
488
491
{:name " Junior" }]
489
492
:participants []
490
- :cloodle-code " " }]
493
+ :cloodle-code " "
494
+ :vote-saved-this-session false }]
491
495
(put! state-destination new-event-state))))))
492
496
493
497
You can’t perform that action at this time.
0 commit comments