use std::collections::HashSet;

use dioxus::prelude::*;

use crate::components::{BlogList, TagSelector};



/// Blog page
#[component]
pub fn Blog(tag: ReadSignal<String>) -> Element
{
   let categories: Signal<HashSet<String>> =
      use_signal(|| HashSet::new());

   rsx!
   {
      main
      {
         class: "blog_style",
         div
         {
            class: "page_content",

            BlogList
            {
               tags: categories
            }

            TagSelector
            {
               url_tag: tag,
               toggled_tags: categories
            }
         }
      }
   }
}
