fix: updated immich endpoint usage to runtime env

Signed-off-by: Varun Raj <mailme@varunraj.in>
This commit is contained in:
Varun Raj committed 2024-08-20 09:32:52 +05:30
1 parent 0d66fa458f
commit 3ad9e9eea3
9 files changed
+56 -49

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import { createContext, useContext } from "react";
interface ConfigContextType {
immichURL: string;
}
const ConfigContext = createContext<ConfigContextType>({
immichURL: "",
});
export default ConfigContext;
export const useConfig = () => {
const context = useContext(ConfigContext) as ConfigContextType;
return context;
}