Skip to content

Commit

Permalink
update the examples to use the latest leptos version.
Browse files Browse the repository at this point in the history
  • Loading branch information
Clement Wanjau committed Dec 19, 2024
1 parent c7a9ba8 commit db204bd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
10 changes: 5 additions & 5 deletions examples/leptos-chart/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use leptos::*;
use leptos::prelude::*;
use apexcharts_rs::prelude::{ApexChartComponent, ChartSeries, ChartType, SeriesData};

#[component]
Expand Down Expand Up @@ -130,10 +130,10 @@ fn App() -> impl IntoView {
z_index: None,
}
];
let (series, _) = create_signal(series);
let (multiple_series, _) = create_signal(multiple_series);
let (radial_series, _) = create_signal(radial_series);
let (category_paired_series, _) = create_signal(category_paired_series);
let (series, _) = signal(series);
let (multiple_series, _) = signal(multiple_series);
let (radial_series, _) = signal(radial_series);
let (category_paired_series, _) = signal(category_paired_series);
view! {
<>
<div class="p-4 text-center">
Expand Down
2 changes: 2 additions & 0 deletions examples/leptos-ssr-chart/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use leptos::prelude::*;

pub mod app;

#[cfg(feature = "hydrate")]
Expand Down
5 changes: 3 additions & 2 deletions examples/leptos-ssr-chart/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
use leptos::prelude::*;

#[cfg(feature = "ssr")]
#[actix_web::main]
async fn main() -> std::io::Result<()> {
use actix_files::Files;
use actix_web::*;
use leptos::*;
use leptos_actix::{generate_route_list, LeptosRoutes};
use leptos_ssr_chart::app::*;

Expand All @@ -22,7 +23,7 @@ async fn main() -> std::io::Result<()> {
.service(Files::new("/pkg", format!("{site_root}/pkg")))
// serve other assets from the `assets` directory
.service(Files::new("/assets", site_root))
.leptos_routes(leptos_options.to_owned(), routes.to_owned(), App)
.leptos_routes( routes.to_owned(), App)
.app_data(web::Data::new(leptos_options.to_owned()))
//.wrap(middleware::Compress::default())
})
Expand Down

0 comments on commit db204bd

Please sign in to comment.