use std::sync::Arc; use askama::Template; use axum::{ extract::State, response::{Html, IntoResponse}, }; use crate::domain::{AppState, Track}; #[derive(Template)] #[template(path = "partials/miniplayer.html")] struct MiniPlayerTemplate { tracks: Vec, } pub async fn miniplayer(State(state): State>) -> impl IntoResponse { Html( MiniPlayerTemplate { tracks: state.mp_tracks.clone(), } .render() .unwrap(), ) }