use crate::components::error_template::{AppError, ErrorTemplate};
use crate::components::playbar::CustomTitle;
use crate::components::playbar::PlayBar;
use crate::components::queue::Queue;
use crate::pages::album::*;
use crate::pages::artist::*;
use crate::pages::dashboard::*;
use crate::pages::liked_songs::*;
use crate::pages::login::*;
use crate::pages::playlist::*;
use crate::pages::profile::*;
use crate::pages::search::*;
use crate::pages::signup::*;
use crate::pages::song::*;
use crate::util::state::GlobalState;
use leptos::prelude::*;
use leptos_meta::*;
use leptos_router::components::*;
use leptos_router::*;
pub fn shell(options: LeptosOptions) -> impl IntoView {
view! {
}
}
#[component]
pub fn App() -> impl IntoView {
// Provides context that manages stylesheets, titles, meta tags, etc.
provide_meta_context();
provide_context(GlobalState::new());
let upload_open = RwSignal::new(false);
let add_artist_open = RwSignal::new(false);
let add_album_open = RwSignal::new(false);
view! {
// injects a stylesheet into the document
// id=leptos means cargo-leptos will hot-reload this stylesheet
// sets the document title
// content for this welcome page
}
.into_view()
}>
}>
}
}
use crate::components::add_album::AddAlbum;
use crate::components::add_artist::AddArtist;
use crate::components::personal::Personal;
use crate::components::sidebar::*;
use crate::components::upload::*;
/// Renders the home page of your application.
#[component]
fn HomePage(
upload_open: RwSignal,
add_artist_open: RwSignal,
add_album_open: RwSignal,
) -> impl IntoView {
view! {
// This will render the child route components
}
}
/// 404 - Not Found
#[component]
fn NotFound() -> impl IntoView {
// set an HTTP status code 404
// this is feature gated because it can only be done during
// initial server-side rendering
// if you navigate to the 404 page subsequently, the status
// code will not be set because there is not a new HTTP request
// to the server
#[cfg(feature = "ssr")]
{
// this can be done inline because it's synchronous
// if it were async, we'd use a server function
let resp = expect_context::();
resp.set_status(axum::http::StatusCode::NOT_FOUND);
}
view! {
"Not Found"
}
}