Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Support): temp disable turnstile #230

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading