Fix dataSet for noFeedback links (#8745)

* fix dataSet for noFeedback links

* rm memo

* rm useless spread
This commit is contained in:
Samuel Newman
2025-07-30 18:17:57 +03:00
committed by Austin McKinley
parent facb7a000e
commit f8d3bdd796
+8 -14
View File
@@ -101,13 +101,9 @@ export const Link = memo(function Link({
{name: 'activate', label: title},
]
const dataSet = useMemo(() => {
const ds = {...dataSetProp}
if (anchorNoUnderline) {
ds.noUnderline = 1
}
return ds
}, [dataSetProp, anchorNoUnderline])
const dataSet = anchorNoUnderline
? {...dataSetProp, noUnderline: 1}
: dataSetProp
if (noFeedback) {
return (
@@ -125,6 +121,8 @@ export const Link = memo(function Link({
onAccessibilityAction?.(e)
}
}}
// @ts-ignore web only -sfn
dataSet={dataSet}
{...props}
android_ripple={{
color: t.atoms.bg_contrast_25.backgroundColor,
@@ -198,13 +196,9 @@ export const TextLink = memo(function TextLink({
console.error('Unable to detect mismatching label')
}
const dataSet = useMemo(() => {
const ds = {...dataSetProp}
if (anchorNoUnderline) {
ds.noUnderline = 1
}
return ds
}, [dataSetProp, anchorNoUnderline])
const dataSet = anchorNoUnderline
? {...dataSetProp, noUnderline: 1}
: dataSetProp
const onPress = useCallback(
(e?: Event) => {