refacto clickoutside componentv2 (#11644)

Switch to ComponentV2

Friday morning refacto & chill with @charles

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Guillim
2025-04-18 17:48:30 +02:00
committed by GitHub
parent cf5649a1df
commit 8512904c0a
25 changed files with 151 additions and 217 deletions

View File

@ -4,9 +4,9 @@ import { captchaTokenState } from '@/captcha/states/captchaTokenState';
import { isRequestingCaptchaTokenState } from '@/captcha/states/isRequestingCaptchaTokenState';
import { isCaptchaRequiredForPath } from '@/captcha/utils/isCaptchaRequiredForPath';
import { captchaState } from '@/client-config/states/captchaState';
import { useLocation } from 'react-router-dom';
import { CaptchaDriverType } from '~/generated-metadata/graphql';
import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';
import { useLocation } from 'react-router-dom';
declare global {
interface Window {
@ -52,8 +52,6 @@ export const useRequestFreshCaptchaToken = () => {
});
break;
case CaptchaDriverType.Turnstile:
// TODO: fix workspace-no-hardcoded-colors rule
// eslint-disable-next-line @nx/workspace-no-hardcoded-colors
captchaWidget = window.turnstile.render('#captcha-widget', {
sitekey: captcha.siteKey,
});