Skip to content

Commit 0a73ff2

Browse files
committed
fix: src regarding async call, detected on jest
1 parent 4064ef9 commit 0a73ff2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/provider/public-env-provider.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ type PublicEnvProviderProps = PropsWithChildren;
2020
* </PublicEnvProvider>
2121
* ```
2222
*/
23-
export const PublicEnvProvider: FC<PublicEnvProviderProps> = async ({
23+
export const PublicEnvProvider: FC<PublicEnvProviderProps> = ({
2424
children,
2525
}) => {
26-
await connection(); // Opt into dynamic rendering
26+
connection(); // Opt into dynamic rendering
2727

2828
// This value will be evaluated at runtime
2929
const publicEnv = getPublicEnv();

src/script/public-env-script.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ type PublicEnvScriptProps = {
2323
* </head>
2424
* ```
2525
*/
26-
export const PublicEnvScript: FC<PublicEnvScriptProps> = async ({ nonce }) => {
27-
await connection(); // Opt into dynamic rendering
26+
export const PublicEnvScript: FC<PublicEnvScriptProps> = ({ nonce }) => {
27+
connection(); // Opt into dynamic rendering
2828

2929
// This value will be evaluated at runtime
3030
const publicEnv = getPublicEnv();

0 commit comments

Comments
 (0)