feat: update to newest leptos

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2023-10-20 23:06:21 +02:00
parent 8ee2ca5c14
commit a7986e304c
15 changed files with 733 additions and 831 deletions

View File

@@ -3,8 +3,8 @@ use leptos::*;
use crate::features::dashboard_list_view::DashboardList;
#[component]
pub fn DashHomePage(cx: Scope) -> impl IntoView {
view! { cx,
pub fn DashHomePage() -> impl IntoView {
view! {
<div class="home-dash">
<DashboardList/>
</div>

View File

@@ -5,9 +5,8 @@ use crate::features::navbar_projects::gen::queries::get_projects_list_view::GetP
use crate::features::navbar_projects::NavbarProjectsView;
#[component]
pub fn FeaturesView(cx: Scope) -> impl IntoView {
pub fn FeaturesView() -> impl IntoView {
let projects = create_local_resource(
cx,
|| (),
|_| async {
vec![
@@ -24,9 +23,9 @@ pub fn FeaturesView(cx: Scope) -> impl IntoView {
);
let emptyProjects: Resource<(), Vec<GetProjectsListViewGetProjects>> =
create_local_resource(cx, || (), |_| async { Vec::new() });
create_local_resource(|| (), |_| async { Vec::new() });
view! { cx,
view! {
<div>
<div class="space-y-5 p-2">
<h1>"NavbarProjects"</h1>

View File

@@ -1,8 +1,8 @@
use leptos::*;
#[component]
pub fn Navbar(cx: Scope) -> impl IntoView {
view! { cx,
pub fn Navbar() -> impl IntoView {
view! {
<div class="flex flex-row justify-between items-center bg-gray-800 p-4">
<div class="flex flex-row items-center">
<div class="text-2xl text-white font-bold">"Como - Todo"</div>
@@ -19,8 +19,8 @@ pub fn Navbar(cx: Scope) -> impl IntoView {
}
#[component]
pub fn HomePage(cx: Scope) -> impl IntoView {
view! { cx,
pub fn HomePage() -> impl IntoView {
view! {
<Navbar/>
<h1 class="text-xl text-red-50">"Welcome to Leptos!"</h1>
}