Closed ilyvion closed 3 weeks ago
I can't reproduce it. Are you using leptos v0.7? If that's the case you should try the leptos-v0.7 branch.
No, this is with leptos v0.6. It's important to note that this is with only use leptos_fluent::leptos_fluent;
(plus whatever it takes to create/load the value needed for translations
), if you have something like use leptos::*
in your file, window
will already be in scope, and you won't see the error.
Here's my full file for reference, imported in lib.rs
with pub mod fluent;
and used from my App
component in app.rs
with fluent::setup();
.
Incidentally, if I put use leptos::*
in my file, which does stop the error, I get
warning: unused import: `leptos`
--> src\fluent.rs:5:5
|
5 | use leptos::*;
| ^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
😅
This change avoids an error of this nature when invoking the macro: