mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-15 17:36:37 +00:00
env context and refactor api support different ports
This commit is contained in:
17
src/providers/EnvProvider.tsx
Normal file
17
src/providers/EnvProvider.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
"use client";
|
||||
|
||||
import EnvContext from "@app/contexts/envContext";
|
||||
import { env } from "@app/lib/types/env";
|
||||
|
||||
interface ApiProviderProps {
|
||||
children: React.ReactNode;
|
||||
env: env;
|
||||
}
|
||||
|
||||
export function EnvProvider({ children, env }: ApiProviderProps) {
|
||||
return (
|
||||
<EnvContext.Provider value={{ env }}>{children}</EnvContext.Provider>
|
||||
);
|
||||
}
|
||||
|
||||
export default EnvProvider;
|
||||
Reference in New Issue
Block a user