File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ pub enum AnalysisState {
1818 Error ( String ) ,
1919}
2020
21- #[ function_component ( App ) ]
21+ #[ component ( App ) ]
2222pub fn app ( ) -> Html {
2323 let state = use_state ( || AnalysisState :: Idle ) ;
2424 let token = use_state ( || Option :: < String > :: None ) ;
Original file line number Diff line number Diff line change 11use yew:: prelude:: * ;
22
3- #[ function_component ( Footer ) ]
3+ #[ component ( Footer ) ]
44pub fn footer ( ) -> Html {
55 html ! {
66 <footer class="footer" >
Original file line number Diff line number Diff line change 11use yew:: prelude:: * ;
22
3- #[ function_component ( Header ) ]
3+ #[ component ( Header ) ]
44pub fn header ( ) -> Html {
55 html ! {
66 <header class="header" >
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ pub struct ResultsProps {
1010 pub on_reset : Callback < ( ) > ,
1111}
1212
13- #[ function_component ( Results ) ]
13+ #[ component ( Results ) ]
1414pub fn results ( props : & ResultsProps ) -> Html {
1515 let report = & props. report ;
1616
@@ -64,7 +64,7 @@ struct CategoryCardProps {
6464 category : CategoryScore ,
6565}
6666
67- #[ function_component ( CategoryCard ) ]
67+ #[ component ( CategoryCard ) ]
6868fn category_card ( props : & CategoryCardProps ) -> Html {
6969 let cat = & props. category ;
7070 let expanded = use_state ( || true ) ;
@@ -128,7 +128,7 @@ struct CheckRowProps {
128128 result : CheckResult ,
129129}
130130
131- #[ function_component ( CheckRow ) ]
131+ #[ component ( CheckRow ) ]
132132fn check_row ( props : & CheckRowProps ) -> Html {
133133 let r = & props. result ;
134134 let show_detail = use_state ( || false ) ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ pub struct ScoreGaugeProps {
66 pub total : u32 ,
77}
88
9- #[ function_component ( ScoreGauge ) ]
9+ #[ component ( ScoreGauge ) ]
1010pub fn score_gauge ( props : & ScoreGaugeProps ) -> Html {
1111 let percentage = if props. total > 0 {
1212 ( ( props. passed as f64 / props. total as f64 ) * 100.0 ) . round ( ) as u32
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ pub struct SearchBarProps {
77 pub is_loading : bool ,
88}
99
10- #[ function_component ( SearchBar ) ]
10+ #[ component ( SearchBar ) ]
1111pub fn search_bar ( props : & SearchBarProps ) -> Html {
1212 let url_ref = use_node_ref ( ) ;
1313 let token_ref = use_node_ref ( ) ;
You can’t perform that action at this time.
0 commit comments