mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-01 10:11:50 +02:00
🐛 Make sure switches are controlled
This commit is contained in:
parent
0b808259ab
commit
309820f072
1 changed files with 4 additions and 4 deletions
|
@ -105,7 +105,7 @@ export const PollSettingsForm = ({ children }: React.PropsWithChildren) => {
|
||||||
</SettingContent>
|
</SettingContent>
|
||||||
<Switch
|
<Switch
|
||||||
id={field.name}
|
id={field.name}
|
||||||
checked={field.value}
|
checked={!!field.value}
|
||||||
onCheckedChange={(checked) => {
|
onCheckedChange={(checked) => {
|
||||||
field.onChange(checked);
|
field.onChange(checked);
|
||||||
}}
|
}}
|
||||||
|
@ -128,7 +128,7 @@ export const PollSettingsForm = ({ children }: React.PropsWithChildren) => {
|
||||||
</SettingTitle>
|
</SettingTitle>
|
||||||
</SettingContent>
|
</SettingContent>
|
||||||
<Switch
|
<Switch
|
||||||
checked={field.value}
|
checked={!!field.value}
|
||||||
onCheckedChange={(checked) => {
|
onCheckedChange={(checked) => {
|
||||||
if (isFree) {
|
if (isFree) {
|
||||||
paywallDialog.trigger();
|
paywallDialog.trigger();
|
||||||
|
@ -159,7 +159,7 @@ export const PollSettingsForm = ({ children }: React.PropsWithChildren) => {
|
||||||
</SettingTitle>
|
</SettingTitle>
|
||||||
</SettingContent>
|
</SettingContent>
|
||||||
<Switch
|
<Switch
|
||||||
checked={field.value}
|
checked={!!field.value}
|
||||||
onCheckedChange={(checked) => {
|
onCheckedChange={(checked) => {
|
||||||
if (isFree) {
|
if (isFree) {
|
||||||
paywallDialog.trigger();
|
paywallDialog.trigger();
|
||||||
|
@ -191,7 +191,7 @@ export const PollSettingsForm = ({ children }: React.PropsWithChildren) => {
|
||||||
</SettingContent>
|
</SettingContent>
|
||||||
<Switch
|
<Switch
|
||||||
id={field.name}
|
id={field.name}
|
||||||
checked={field.value}
|
checked={!!field.value}
|
||||||
onCheckedChange={(checked) => {
|
onCheckedChange={(checked) => {
|
||||||
if (isFree) {
|
if (isFree) {
|
||||||
paywallDialog.trigger();
|
paywallDialog.trigger();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue