mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
chore(ci): move all examples to run on stable (#2501)
This commit is contained in:
parent
43178b56dc
commit
a1a989011a
26 changed files with 41 additions and 39 deletions
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly-2024-03-31"
|
||||
channel = "stable"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly-2024-03-31"
|
||||
channel = "stable"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly-2024-03-31"
|
||||
channel = "stable"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly-2024-03-31"
|
||||
channel = "stable"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly-2024-03-31"
|
||||
channel = "stable"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly-2024-03-31"
|
||||
channel = "stable"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly-2024-03-31"
|
||||
channel = "stable"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly-2024-03-31"
|
||||
channel = "stable"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly-2024-03-31"
|
||||
channel = "stable"
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#![feature(lazy_cell)]
|
||||
|
||||
use leptos::*;
|
||||
use leptos_meta::*;
|
||||
use leptos_router::*;
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly-2024-03-31"
|
||||
channel = "stable"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly-2024-03-31"
|
||||
channel = "stable"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly-2024-03-31"
|
||||
channel = "stable"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly-2024-03-31"
|
||||
channel = "stable"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly-2024-03-31"
|
||||
channel = "stable"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly-2024-03-31"
|
||||
channel = "stable"
|
||||
|
|
|
@ -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()/>
|
||||
}
|
||||
})
|
||||
})
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#![feature(result_flattening)]
|
||||
|
||||
pub mod app;
|
||||
|
||||
#[cfg(feature = "hydrate")]
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly-2024-03-31"
|
||||
channel = "stable"
|
||||
|
|
|
@ -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()/>
|
||||
}
|
||||
})
|
||||
})
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#![feature(result_flattening)]
|
||||
|
||||
pub mod app;
|
||||
|
||||
#[cfg(feature = "ssr")]
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly-2024-03-31"
|
||||
channel = "stable"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly-2024-03-31"
|
||||
channel = "stable"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly-2024-03-31"
|
||||
channel = "stable"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly-2024-03-31"
|
||||
channel = "stable"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly-2024-03-31"
|
||||
channel = "stable"
|
||||
|
|
Loading…
Reference in a new issue