chore(ci): move all examples to run on stable (#2501)

This commit is contained in:
mahmoud-eltahawy 2024-04-05 20:57:48 +02:00 committed by GitHub
parent 43178b56dc
commit a1a989011a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 41 additions and 39 deletions

View file

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"

View file

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"

View file

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"

View file

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"

View file

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"

View file

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"

View file

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"

View file

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"

View file

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"

View file

@ -1,5 +1,3 @@
#![feature(lazy_cell)]
use leptos::*;
use leptos_meta::*;
use leptos_router::*;

View file

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"

View file

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"

View file

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"

View file

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"

View file

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"

View file

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"

View file

@ -80,20 +80,24 @@ fn Post() -> impl IntoView {
.map_err(|_| PostError::InvalidId)
})
};
let post = create_resource(id, |id| async move {
let post_resource = create_resource(id, |id| async move {
match id {
Err(e) => Err(e),
Ok(id) => get_post(id)
.await
.map(|data| data.ok_or(PostError::PostNotFound))
.map_err(|_| PostError::ServerError)
.flatten(),
.map_err(|_| PostError::ServerError),
}
});
let post = move || match post_resource.get() {
Some(Ok(Ok(v))) => Ok(v),
_ => Err(PostError::ServerError),
};
let post_view = move || {
post.and_then(|post| {
view! {
post().and_then(|post| {
Ok(view! {
// render content
<h1>{&post.title}</h1>
<p>{&post.content}</p>
@ -103,7 +107,7 @@ fn Post() -> impl IntoView {
// when it's first served
<Title text=post.title.clone()/>
<Meta name="description" content=post.content.clone()/>
}
})
})
};

View file

@ -1,5 +1,3 @@
#![feature(result_flattening)]
pub mod app;
#[cfg(feature = "hydrate")]

View file

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"

View file

@ -80,20 +80,24 @@ fn Post() -> impl IntoView {
.map_err(|_| PostError::InvalidId)
})
};
let post = create_resource(id, |id| async move {
let post_resource = create_resource(id, |id| async move {
match id {
Err(e) => Err(e),
Ok(id) => get_post(id)
.await
.map(|data| data.ok_or(PostError::PostNotFound))
.map_err(|_| PostError::ServerError)
.flatten(),
.map_err(|_| PostError::ServerError),
}
});
let post = move || match post_resource.get() {
Some(Ok(Ok(v))) => Ok(v),
_ => Err(PostError::ServerError),
};
let post_view = move || {
post.and_then(|post| {
view! {
post().and_then(|post| {
Ok(view! {
// render content
<h1>{&post.title}</h1>
<p>{&post.content}</p>
@ -103,7 +107,7 @@ fn Post() -> impl IntoView {
// when it's first served
<Title text=post.title.clone()/>
<Meta name="description" content=post.content.clone()/>
}
})
})
};

View file

@ -1,5 +1,3 @@
#![feature(result_flattening)]
pub mod app;
#[cfg(feature = "ssr")]

View file

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"

View file

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"

View file

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"

View file

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"

View file

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable"