Skip to content

Commit b740527

Browse files
fix(web): migrate client env variables to T3 Env
Ultra-worked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
1 parent 43960cb commit b740527

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

apps/web/src/app/providers.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ import { Provider as JotaiProvider } from "jotai";
66
import dynamic from "next/dynamic";
77
import { type AbstractIntlMessages, NextIntlClientProvider } from "next-intl";
88
import type { ReactNode } from "react";
9+
import { env } from "@/config/env";
910
import { getQueryClient } from "@/lib/get-query-client";
1011

11-
const ENABLE_DEVTOOLS = process.env.NEXT_PUBLIC_ENABLE_DEVTOOLS === "true";
12-
13-
const TanStackDevTools = ENABLE_DEVTOOLS
14-
? dynamic(
15-
() => import("@/components/devtools/tanstack-devtools").then((mod) => mod.TanStackDevTools),
16-
{ ssr: false }
17-
)
18-
: () => null;
12+
const TanStackDevTools =
13+
env.NEXT_PUBLIC_ENABLE_DEVTOOLS === "true"
14+
? dynamic(
15+
() => import("@/components/devtools/tanstack-devtools").then((mod) => mod.TanStackDevTools),
16+
{ ssr: false }
17+
)
18+
: () => null;
1919

2020
interface ProvidersProps {
2121
children: ReactNode;

apps/web/src/lib/auth-client.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { createAuthClient } from "better-auth/react";
2+
import { env } from "@/config/env";
23

34
export const authClient = createAuthClient({
4-
baseURL: process.env.NEXT_PUBLIC_BETTER_AUTH_URL || "http://localhost:3000",
5+
baseURL: env.NEXT_PUBLIC_BETTER_AUTH_URL,
56
});
67

78
export const { useSession, signIn, signOut } = authClient;

0 commit comments

Comments
 (0)