use yew::prelude::{function_component, html, Html};

mod fetch_posts;
mod navbar;
mod post;
mod text;

use navbar::NavbarElemProps;

#[function_component]
fn App() -> Html {
    let elements = vec![NavbarElemProps {
        icon: "fa-solid fa-user".to_string(),
        tooltip: "Account".to_string(),
        link: "/account".to_string(),
        spacer: false,
    }];

    html! {
        <>
        <navbar::Navbar {elements}/>
        <a rel="me" href="https://kolektiva.social/@vanten_s" class="h-0 w-0"></a>
        <div class="p-20 pb-full">
        <text::Paragraph text="Webshop" classes="text-4xl"/>
        </div>
        <div class="flex"></div>
        </>
    }
}

fn main() {
    dotenv::dotenv();
    yew::Renderer::<App>::new().render();
}
