New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(web): add useManageSwitchState #471
Conversation
✅ Deploy Preview for reearth-web ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #471 +/- ##
==========================================
+ Coverage 26.72% 26.73% +0.01%
==========================================
Files 1279 1280 +1
Lines 141228 141253 +25
Branches 3436 3440 +4
==========================================
+ Hits 37738 37763 +25
Misses 102369 102369
Partials 1121 1121
Flags with carried forward coverage won't be shown. Click here to find out more.
|
id: string; | ||
active: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id: string; | |
active: boolean; | |
name: string; |
I think the props has id
and active
field in default, so could you set name
to this field?
Also could you check if the name field is included in the fields state which is returned from the hooks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added and committed.
@@ -2,6 +2,7 @@ import { useState, useCallback } from "react"; | |||
|
|||
type SwitchField<T> = { | |||
id: string; | |||
name?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これはいらないです
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After @keiya01 's comment is addressed and resolved you can merge!
Co-authored-by: 長田淳史 <> Co-authored-by: keiya sasaki <keiya.s.0210@gmail.com>
Overview
add useManageSwitchState
How I tested
Confirmation of activation assuming multiple component (button) state use