Files
vibetorrent/frontend/src/components/hooks/use_random.rs
spinline 75efd877c4
Some checks failed
Build MIPS Binary / build (push) Failing after 1m53s
chore: cleanup unused code, files, and improve code quality
2026-02-12 22:44:38 +03:00

6 lines
160 B
Rust

use leptos::prelude::*;
pub fn use_random_id_for(prefix: &str) -> String {
format!("{}_{}", prefix, js_sys::Math::random().to_string().replace(".", ""))
}