feat(ui): add public landing page with impressum and privacy pages
Some checks failed
Some checks failed
Introduce a marketing landing page at `/` with hero section, feature grid, how-it-works steps, CTA banner, and footer. Move the authenticated dashboard to `/dashboard`. Add static Impressum and Privacy Policy pages for EU legal compliance. Update login redirect defaults accordingly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,26 @@
|
||||
use crate::Route;
|
||||
use dioxus::prelude::*;
|
||||
|
||||
/// Login redirect component.
|
||||
///
|
||||
/// Redirects the user to the external OAuth authentication endpoint.
|
||||
/// If no `redirect_url` is provided, defaults to `/dashboard`.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `redirect_url` - URL to redirect to after successful authentication
|
||||
#[component]
|
||||
pub fn Login(redirect_url: String) -> Element {
|
||||
let navigator = use_navigator();
|
||||
|
||||
use_effect(move || {
|
||||
let target = format!("/auth?redirect_url={}", redirect_url);
|
||||
// Default to /dashboard when redirect_url is empty.
|
||||
let destination = if redirect_url.is_empty() {
|
||||
"/dashboard".to_string()
|
||||
} else {
|
||||
redirect_url.clone()
|
||||
};
|
||||
let target = format!("/auth?redirect_url={destination}");
|
||||
navigator.push(NavigationTarget::<Route>::External(target));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user