fix: updated immich endpoint usage to runtime env
Signed-off-by: Varun Raj <mailme@varunraj.in>
This commit is contained in:
1 parent
0d66fa458f
commit
3ad9e9eea3
9 files changed
+56
-49
No files matched your search
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user