use yew::prelude::*;

use crate::pages::blog::authorcard::AuthorCard;

/*pub enum Msg {
  NextAuthors,
}*/

pub struct Authors {
  seeds: Vec<u8>,
}
impl Component for Authors {
  type Message = (); //Msg;
  type Properties = ();

  fn create(_ctx: &Context<Self>) -> Self {
    Self { seeds: vec![0], }
  }

  /*fn update(&mut self, _ctx: &Context<Self>, msg: Self::Message) -> bool {
    match msg { Msg::NextAuthors => { self.seeds = vec![0]; true } }
  }*/

  fn view(&self, _: &Context<Self>) -> Html {
    html! {
      { for self.seeds.iter().map(|&seed| { html! {
        <AuthorCard {seed} />
      } }) }
    }
  }
}
