(ns com.oly.static-sites.do-blog.pages.article
  (:require [reagent.core :as r]
            [reitit.frontend.easy :as rfe]
            [com.oly.static-sites.do-blog.pages.helpers.utils :refer [format-date]]
            [com.oly.static-sites.do-blog.pages.helpers.database :refer [search-articles state]]
            [com.oly.static-sites.do-blog.pages.components.core :refer [ui-tags title-text-image article-list-author-media-flipped]]))


(defn article-page [{:keys [path-params] :as route}]
  (let [document (r/cursor state [:document])]
    (fn [{:keys [path-params] :as route}]
      [:<>
       [title-text-image
        {:title (-> @document :details :title)
         :content (-> @document :hiccup)}
        (-> @document :details)]])))
