fix(frontend): pin deps (#10121)

<!-- Clearly explain the need for these changes: -->

### Changes 🏗️

This PR updates the .npmrc file to improve dependency consistency across
local and CI environments when using pnpm.

Specifically:

- `save-exact=true` ensures all dependencies are pinned to exact
versions, preventing version drift ( _especially important for tools
like `prettier`, where even minor changes can lead to inconsistent
formatting in commits_ ).

This change aims to reduce formatting discrepancies and improve
reproducibility across machines and contributors.


### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
  - [x] formatting & lint passes on the CI
This commit is contained in:
Ubbe
2025-06-05 19:02:27 +04:00
committed by GitHub
parent 5b324abc7c
commit 7d10dc4e7b
5 changed files with 733 additions and 745 deletions

View File

@@ -47,10 +47,13 @@ export function useTurnstile({
useEffect(() => {
const behaveAs = getBehaveAs();
const hasTurnstileKey = !!TURNSTILE_SITE_KEY;
const turnstileDisabled = process.env.NEXT_PUBLIC_DISABLE_TURNSTILE === "true";
const turnstileDisabled =
process.env.NEXT_PUBLIC_DISABLE_TURNSTILE === "true";
// Only render Turnstile in cloud environment if not explicitly disabled
setShouldRender(behaveAs === BehaveAs.CLOUD && hasTurnstileKey && !turnstileDisabled);
setShouldRender(
behaveAs === BehaveAs.CLOUD && hasTurnstileKey && !turnstileDisabled,
);
// Skip verification if disabled, in local development, or no key
if (turnstileDisabled || behaveAs !== BehaveAs.CLOUD || !hasTurnstileKey) {