penpot/frontend/src/uxbox/main/ui/settings.cljs
2020-02-04 16:05:51 +01:00

33 lines
1.0 KiB
Clojure

;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) 2015-2016 Andrey Antukh <niwi@niwi.nz>
;; Copyright (c) 2015-2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
(ns uxbox.main.ui.settings
(:require
[cuerdas.core :as str]
[potok.core :as ptk]
[rumext.alpha :as mf]
[uxbox.builtins.icons :as i]
[uxbox.main.ui.messages :refer [messages-widget]]
[uxbox.main.ui.settings.header :refer [header]]
[uxbox.main.ui.settings.password :refer [password-page]]
[uxbox.main.ui.settings.profile :refer [profile-page]]))
(mf/defc settings
{:wrap [mf/wrap-memo]}
[{:keys [route] :as props}]
(let [section (get-in route [:data :name])]
[:main.dashboard-main
[:& messages-widget]
[:& header {:section section}]
(case section
:settings-profile (mf/element profile-page)
:settings-password (mf/element password-page))]))