Skip to content

Commit

Permalink
Rename to ClientContextEnvVars
Browse files Browse the repository at this point in the history
Since the pages router counterpart is called ScaffoldedEnvVars it's
inconsistent if this one's called ClientContextEnvVariables. They should
either both be …EnvVars or both be …EnvVariables.
  • Loading branch information
henrycatalinismith committed Dec 28, 2024
1 parent bc10a68 commit c5d075d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/environment-variables/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The `<RootLayout>` component in `src/app/layout.tsx` makes a set of runtime
environment variables from the Node.js process on the server available to
client-side code by adding them as values to a `ClientContext` provider.

The [`ClientContextEnvVariables`](../types/ClientContextEnvVariables.html) type alias is a good starting point
The [`ClientContextEnvVars`](../types/ClientContextEnvVars.html) type alias is a good starting point
when adding a new runtime environment variable to app router code. Add your
variable there and then fix any resulting type errors and you'll be up and
running.
Expand Down
2 changes: 1 addition & 1 deletion docs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export { default as shouldLoad } from 'core/caching/shouldLoad';
export { default as ZUIFuture, type ZUIFutureProps } from 'zui/ZUIFuture';
export { type IFuture } from 'core/caching/futures';
export { removeOffset } from 'utils/dateUtils';
export { type ClientContextEnvVariables } from 'core/env/ClientContext';
export { type ClientContextEnvVars } from 'core/env/ClientContext';
export { type ScaffoldedEnvVars } from 'utils/next';
4 changes: 2 additions & 2 deletions src/core/env/ClientContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ declare module '@mui/styles/defaultTheme' {
*
* @category Environment Variables
*/
export type ClientContextEnvVariables = {
export type ClientContextEnvVars = {
MUIX_LICENSE_KEY: string | null;
ZETKIN_APP_DOMAIN: string | null;
};

type ClientContextProps = {
children: ReactNode;
envVars: ClientContextEnvVariables;
envVars: ClientContextEnvVars;
headers: Record<string, string>;
lang: string;
messages: MessageList;
Expand Down

0 comments on commit c5d075d

Please sign in to comment.