Fix code listing in tutorial/index.mdx (#2836)

* Fix code listing in tutorial/index.mdx

Sync with line 358

* update latest tutorial

Changes here should be enough

Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
This commit is contained in:
Nadir Miralimov 2022-11-06 15:29:03 +02:00 committed by GitHub
parent 868b2c235a
commit 81be10870a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -361,7 +361,7 @@ parent when a video is selected, which is done via a `Callback`. This concept is
We modify its props to take an `on_click` callback:
```rust ,ignore {4}
#[derive(Clone, Properties, PartialEq)]
#[derive(Properties, PartialEq)]
struct VideosListProps {
videos: Vec<Video>,
+ on_click: Callback<Video>
@ -399,7 +399,7 @@ a new component, `VideoDetails`, component that is displayed when a video is cli
use website_test::tutorial::Video;
use yew::prelude::*;
#[derive(Clone, Properties, PartialEq)]
#[derive(Properties, PartialEq)]
struct VideosDetailsProps {
video: Video,
}

View File

@ -287,7 +287,7 @@ struct Video {
url: String,
}
#[derive(Properties, PartialEq)]
#[derive(Clone, Properties, PartialEq)]
struct VideosListProps {
videos: Vec<Video>,
}