fix(ui): structurally resolve unclickable watch path badges

This commit is contained in:
Yash Kumar
2026-07-09 16:59:25 +05:30
parent 1c4414165d
commit ae95485b74
10 changed files with 60 additions and 30 deletions
@@ -438,14 +438,17 @@ export const SaveBitbucketProvider = ({ applicationId }: Props) => {
{field.value?.map((path, index) => (
<Badge key={index} variant="secondary">
{path}
<X
className="ml-1 size-3 cursor-pointer"
<button
type="button"
className="ml-1 cursor-pointer hover:text-destructive focus:outline-none"
onClick={() => {
const newPaths = [...(field.value || [])];
newPaths.splice(index, 1);
form.setValue("watchPaths", newPaths);
}}
/>
>
<X className="size-3" />
</button>
</Badge>
))}
</div>
@@ -242,14 +242,17 @@ export const SaveGitProvider = ({ applicationId }: Props) => {
{field.value?.map((path, index) => (
<Badge key={index} variant="secondary">
{path}
<X
className="ml-1 size-3 cursor-pointer"
<button
type="button"
className="ml-1 cursor-pointer hover:text-destructive focus:outline-none"
onClick={() => {
const newPaths = [...(field.value || [])];
newPaths.splice(index, 1);
form.setValue("watchPaths", newPaths);
}}
/>
>
<X className="size-3" />
</button>
</Badge>
))}
</div>
@@ -466,14 +466,17 @@ export const SaveGiteaProvider = ({ applicationId }: Props) => {
className="flex items-center gap-1"
>
{path}
<X
className="size-3 cursor-pointer hover:text-destructive"
<button
type="button"
className="cursor-pointer hover:text-destructive focus:outline-none"
onClick={() => {
const newPaths = [...(field.value || [])];
newPaths.splice(index, 1);
field.onChange(newPaths);
}}
/>
>
<X className="size-3" />
</button>
</Badge>
))}
</div>
@@ -478,14 +478,17 @@ export const SaveGithubProvider = ({ applicationId }: Props) => {
className="flex items-center gap-1"
>
{path}
<X
className="size-3 cursor-pointer hover:text-destructive"
<button
type="button"
className="cursor-pointer hover:text-destructive focus:outline-none"
onClick={() => {
const newPaths = [...(field.value || [])];
newPaths.splice(index, 1);
field.onChange(newPaths);
}}
/>
>
<X className="size-3" />
</button>
</Badge>
))}
</div>
@@ -459,14 +459,17 @@ export const SaveGitlabProvider = ({ applicationId }: Props) => {
className="flex items-center gap-1"
>
{path}
<X
className="size-3 cursor-pointer hover:text-destructive"
<button
type="button"
className="cursor-pointer hover:text-destructive focus:outline-none"
onClick={() => {
const newPaths = [...(field.value || [])];
newPaths.splice(index, 1);
field.onChange(newPaths);
}}
/>
>
<X className="size-3" />
</button>
</Badge>
))}
</div>
@@ -442,14 +442,17 @@ export const SaveBitbucketProviderCompose = ({ composeId }: Props) => {
{field.value?.map((path, index) => (
<Badge key={index} variant="secondary">
{path}
<X
className="ml-1 size-3 cursor-pointer"
<button
type="button"
className="ml-1 cursor-pointer hover:text-destructive focus:outline-none"
onClick={() => {
const newPaths = [...(field.value || [])];
newPaths.splice(index, 1);
form.setValue("watchPaths", newPaths);
}}
/>
>
<X className="size-3" />
</button>
</Badge>
))}
</div>
@@ -251,14 +251,17 @@ export const SaveGitProviderCompose = ({ composeId }: Props) => {
{field.value?.map((path, index) => (
<Badge key={index} variant="secondary">
{path}
<X
className="ml-1 size-3 cursor-pointer"
<button
type="button"
className="ml-1 cursor-pointer hover:text-destructive focus:outline-none"
onClick={() => {
const newPaths = [...(field.value || [])];
newPaths.splice(index, 1);
form.setValue("watchPaths", newPaths);
}}
/>
>
<X className="size-3" />
</button>
</Badge>
))}
</div>
@@ -431,14 +431,17 @@ export const SaveGiteaProviderCompose = ({ composeId }: Props) => {
{field.value?.map((path, index) => (
<Badge key={index} variant="secondary">
{path}
<X
className="ml-1 size-3 cursor-pointer"
<button
type="button"
className="ml-1 cursor-pointer hover:text-destructive focus:outline-none"
onClick={() => {
const newPaths = [...(field.value || [])];
newPaths.splice(index, 1);
form.setValue("watchPaths", newPaths);
}}
/>
>
<X className="size-3" />
</button>
</Badge>
))}
</div>
@@ -470,14 +470,17 @@ export const SaveGithubProviderCompose = ({ composeId }: Props) => {
{field.value?.map((path, index) => (
<Badge key={index} variant="secondary">
{path}
<X
className="ml-1 size-3 cursor-pointer"
<button
type="button"
className="ml-1 cursor-pointer hover:text-destructive focus:outline-none"
onClick={() => {
const newPaths = [...(field.value || [])];
newPaths.splice(index, 1);
form.setValue("watchPaths", newPaths);
}}
/>
>
<X className="size-3" />
</button>
</Badge>
))}
</div>
@@ -460,14 +460,17 @@ export const SaveGitlabProviderCompose = ({ composeId }: Props) => {
{field.value?.map((path, index) => (
<Badge key={index} variant="secondary">
{path}
<X
className="ml-1 size-3 cursor-pointer"
<button
type="button"
className="ml-1 cursor-pointer hover:text-destructive focus:outline-none"
onClick={() => {
const newPaths = [...(field.value || [])];
newPaths.splice(index, 1);
form.setValue("watchPaths", newPaths);
}}
/>
>
<X className="size-3" />
</button>
</Badge>
))}
</div>