(value: string)
| 80 | ]) |
| 81 | |
| 82 | function onClickChoice(value: string) { |
| 83 | const params = new URLSearchParams(asPathQuery) |
| 84 | params.set(queryStringKey, value) |
| 85 | const newPath = `/${locale}${asPathRoot}?${params}` |
| 86 | router.push(newPath, undefined, { shallow: true, locale }) |
| 87 | |
| 88 | sendEvent({ |
| 89 | type: EventType.preference, |
| 90 | preference_name: preferenceName, |
| 91 | preference_value: value, |
| 92 | }) |
| 93 | |
| 94 | Cookies.set(cookieKey, value, { |
| 95 | sameSite: 'strict', |
| 96 | secure: document.location.protocol !== 'http:', |
| 97 | expires: 365, |
| 98 | }) |
| 99 | } |
| 100 | |
| 101 | const sharedContainerProps = { |
| 102 | 'data-testid': `${queryStringKey}-picker`, |
no test coverage detected