Skip to content
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

Checked state not being set by default on local #206

Open
pogseal opened this issue Aug 29, 2023 · 0 comments
Open

Checked state not being set by default on local #206

pogseal opened this issue Aug 29, 2023 · 0 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@pogseal
Copy link
Contributor

pogseal commented Aug 29, 2023

Works only in production. Likely related to how the checked state is set on the RadioGroup headless UI component.

          <RadioGroup.Option
                                          key={row.id}
                                          value={row}
                                       >
                                          {({ active, checked }) => (
                                             <RadioGroup.Label
                                                className={clsx(
                                                   checked
                                                      ? "bg-zinc-100 font-semibold dark:bg-zinc-700/80"
                                                      : "text-1",
                                                   "group relative flex w-full cursor-pointer items-center justify-between gap-2 rounded-md px-3 py-2"
                                                )}
                                             >
                                                <time
                                                   className="flex items-center gap-1.5 text-sm group-hover:underline"
                                                   dateTime={row?.updatedAt}
                                                >
                                                   {format(
                                                      new Date(
                                                         row?.updatedAt as string
                                                      ),
                                                      "MMMM d, hh:mm aaa"
                                                   )}
                                                </time>
                                                {index == 0 && (
                                                   <span className="rounded-full bg-zinc-200 px-2 py-0.5 text-[10px] font-bold uppercase dark:bg-zinc-600 dark:text-white">
                                                      Live
                                                   </span>
                                                )}
                                             </RadioGroup.Label>
                                          )}
                                       </RadioGroup.Option>

Replicate by opening the history modal on local vs production

Screenshot 2023-08-29 at 12 48 27 PM Screenshot 2023-08-29 at 12 47 59 PM
@xHomu xHomu self-assigned this Aug 29, 2023
@xHomu xHomu added bug Something isn't working good first issue Good for newcomers labels Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants