 
 (defn has-socials? [person]
   (not (zero? (count (person/socials person)))))
+
+(defn has-icon? [social]
+  (if (str/contains? social "|") 0 1))
+
+(defn sort-social-icons-first [socials]
+  (sort #(compare (has-icon? %) (has-icon? %2)) socials))
 
 (defcomponent social-section-item-component [data _ _]
   (render [_]

  (render [_]
    (let [{:keys [person editing? gizmo]} data
          need-placeholder? (not (has-about? person))
          about (if need-placeholder? person/about-placeholder (person/about person))]
      (dom/div {:class (str "extended-info-section about clearfix" (if need-placeholder? " has-placeholder"))}
        (if editing?
          (om/build gizmo-component {:descriptor about-gizmo-descriptor
                                     :state      gizmo
                                     :content    {:person person}}))
        (dom/div {:class "info-title"} "about")
        (dom/div {:class "info-body"}
          (non-sanitized-div about))))))

  (render [_]
    (let [{:keys [person people editing? gizmo]} data
          need-placeholder? (not (has-tags? person))
          tags (if need-placeholder? person/tags-placeholder (person/tags person))
          tags-gizmo {:descriptor tags-gizmo-descriptor
                      :state      gizmo
                      :content    {:person person
                                   :people people}}]
      (dom/div {:class (str "extended-info-section tags clearfix" (if need-placeholder? " has-placeholder"))}
        (if editing?
          (om/build gizmo-component tags-gizmo))
        (dom/div {:class "info-title"} "interests")
        (dom/div {:class "info-body"}
          (om/build-all tags-section-item-component tags))))))

(defcomponent social-section-component [data _ _]
  (render [_]
    (let [{:keys [person editing? gizmo]} data
          need-placeholder? (not (has-socials? person))
          socials (if need-placeholder? person/socials-placeholder (sort-social-icons-first (person/socials person)))
          social-gizmo {:descriptor social-gizmo-descriptor
                        :state      gizmo
                        :content    {:person person}}]
      (dom/div {:class (str "extended-info-section social clearfix" (if need-placeholder? " has-placeholder"))}
        (if editing?
          (om/build gizmo-component social-gizmo))
        (dom/div {:class "info-title"} "social")
        (dom/div {:class "info-body"}
          (om/build-all social-section-item-component socials))))))
