feat(db): Added database setup and basic types (#5)
Co-authored-by: Sharang Parnerkar <parnerkarsharang@gmail.com> Reviewed-on: #5
This commit was merged in pull request #5.
This commit is contained in:
13
src/app.rs
13
src/app.rs
@@ -93,6 +93,17 @@ pub fn App() -> Element {
|
||||
"#
|
||||
}
|
||||
|
||||
div { "data-theme": "certifai-dark", Router::<Route> {} }
|
||||
// Apply persisted theme to <html> before first paint to avoid flash.
|
||||
// Default to certifai-dark when no preference is stored.
|
||||
document::Script {
|
||||
r#"
|
||||
(function() {{
|
||||
var t = localStorage.getItem('theme') || 'certifai-dark';
|
||||
document.documentElement.setAttribute('data-theme', t);
|
||||
}})();
|
||||
"#
|
||||
}
|
||||
|
||||
Router::<Route> {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user