Skip to content

Commit

Permalink
fix(Support): temp disable turnstile
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeaturner committed Mar 14, 2024
1 parent 82df441 commit 90f1aad
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions client/src/components/support/CreateTicketFlow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const CreateTicketFlow: React.FC<CreateTicketFlowProps> = ({ isLoggedIn }) => {
const [success, setSuccess] = useState(false);
const [files, setFiles] = useState<File[]>([]);
const [turnstileToken, setTurnstileToken] = useState<string>("");
const [challengePassed, setChallengePassed] = useState(false);
const [challengePassed, setChallengePassed] = useState(true);

useEffect(() => {
const searchParams = new URLSearchParams(location.search);
Expand All @@ -66,11 +66,11 @@ const CreateTicketFlow: React.FC<CreateTicketFlowProps> = ({ isLoggedIn }) => {
}
}, []);

useEffect(() => {
if (isLoggedIn) return;
if (!turnstileToken) return;
verifyTurnstile(turnstileToken);
}, [isLoggedIn, turnstileToken]);
// useEffect(() => {
// if (isLoggedIn) return;
// if (!turnstileToken) return;
// verifyTurnstile(turnstileToken);
// }, [isLoggedIn, turnstileToken]);

async function verifyTurnstile(token: string) {
try {
Expand Down Expand Up @@ -442,11 +442,11 @@ const CreateTicketFlow: React.FC<CreateTicketFlowProps> = ({ isLoggedIn }) => {
onUpload={saveFilesToState}
showUploads={true}
/>
{!isLoggedIn && (
{/*{!isLoggedIn && (
<div className="flex flex-row items-center justify-center mt-8">
<TurnstileWidget onSuccess={(t) => setTurnstileToken(t)} />
</div>
)}
)}*/}
<div className="flex flex-row justify-end mt-4">
<Button
color="blue"
Expand Down

0 comments on commit 90f1aad

Please sign in to comment.