Skip to content

Commit

Permalink
remove unused and update token variable
Browse files Browse the repository at this point in the history
  • Loading branch information
christinaroise committed Aug 27, 2024
1 parent e8120fc commit e1eaa0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 42 deletions.
38 changes: 0 additions & 38 deletions studioShared/lib/fetchWithToken.ts

This file was deleted.

8 changes: 4 additions & 4 deletions studioShared/lib/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ import { experimental_taintUniqueValue } from "react";

export const token =
process.env.NODE_ENV === "development"
? process.env.SANITY_API_TOKEN_DEV
: process.env.SANITY_API_TOKEN_PROD;
? process.env.SANITY_SHARED_API_TOKEN_DEV
: process.env.SANITY_SHARED_API_TOKEN_PROD;

if (!token) {
throw new Error(
`Missing SANITY_API_TOKEN for ${
process.env.NODE_ENV === "development" ? "development" : "production"
} environment`,
} environment`
);
}

experimental_taintUniqueValue(
"Do not pass the sanity API read token to the client.",
process,
token,
token
);

0 comments on commit e1eaa0c

Please sign in to comment.