Fix dataSet for noFeedback links (#8745)
* fix dataSet for noFeedback links * rm memo * rm useless spread
This commit is contained in:
committed by
Austin McKinley
parent
facb7a000e
commit
f8d3bdd796
@@ -101,13 +101,9 @@ export const Link = memo(function Link({
|
|||||||
{name: 'activate', label: title},
|
{name: 'activate', label: title},
|
||||||
]
|
]
|
||||||
|
|
||||||
const dataSet = useMemo(() => {
|
const dataSet = anchorNoUnderline
|
||||||
const ds = {...dataSetProp}
|
? {...dataSetProp, noUnderline: 1}
|
||||||
if (anchorNoUnderline) {
|
: dataSetProp
|
||||||
ds.noUnderline = 1
|
|
||||||
}
|
|
||||||
return ds
|
|
||||||
}, [dataSetProp, anchorNoUnderline])
|
|
||||||
|
|
||||||
if (noFeedback) {
|
if (noFeedback) {
|
||||||
return (
|
return (
|
||||||
@@ -125,6 +121,8 @@ export const Link = memo(function Link({
|
|||||||
onAccessibilityAction?.(e)
|
onAccessibilityAction?.(e)
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
// @ts-ignore web only -sfn
|
||||||
|
dataSet={dataSet}
|
||||||
{...props}
|
{...props}
|
||||||
android_ripple={{
|
android_ripple={{
|
||||||
color: t.atoms.bg_contrast_25.backgroundColor,
|
color: t.atoms.bg_contrast_25.backgroundColor,
|
||||||
@@ -198,13 +196,9 @@ export const TextLink = memo(function TextLink({
|
|||||||
console.error('Unable to detect mismatching label')
|
console.error('Unable to detect mismatching label')
|
||||||
}
|
}
|
||||||
|
|
||||||
const dataSet = useMemo(() => {
|
const dataSet = anchorNoUnderline
|
||||||
const ds = {...dataSetProp}
|
? {...dataSetProp, noUnderline: 1}
|
||||||
if (anchorNoUnderline) {
|
: dataSetProp
|
||||||
ds.noUnderline = 1
|
|
||||||
}
|
|
||||||
return ds
|
|
||||||
}, [dataSetProp, anchorNoUnderline])
|
|
||||||
|
|
||||||
const onPress = useCallback(
|
const onPress = useCallback(
|
||||||
(e?: Event) => {
|
(e?: Event) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user