-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add env vars * Move txs.json to mocks dir * Add msw dep * Add API mock handler * Add API mock worker * Add generated mockServiceWorker * Add MockApiProvider * Remove comments from sample envfile * Fix render in provider * Add envvar to playwright config
- Loading branch information
Showing
13 changed files
with
993 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
NEXT_PUBLIC_API_URL=http://localhost:4000/api/v1 | ||
NEXT_PUBLIC_MOCK_API=FALSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { z } from "zod"; | ||
|
||
//NOTE - Webpack disallows reading process.env as a whole, so we need to parse individual variables | ||
export const env = { | ||
NEXT_PUBLIC_API_URL: z.string().url().parse(process.env.NEXT_PUBLIC_API_URL), | ||
NEXT_PUBLIC_MOCK_API: z | ||
.optional(z.enum(["TRUE", "FALSE"])) | ||
.parse(process.env.NEXT_PUBLIC_MOCK_API), | ||
}; |
Oops, something went wrong.