added http provider

This commit is contained in:
Carter 2024-10-23 08:49:33 -06:00
parent 99ea402bad
commit a7b417abdf
8 changed files with 575 additions and 23 deletions

View file

@ -0,0 +1,26 @@
import { PropsWithChildren } from "react";
import UserProvider, { useUserAPI } from "./userAPI";
export const pondURL = (partial: string, demo: boolean = false): string => {
let url = process.env.REACT_APP_API_URL + (demo ? "/demo" : "") + partial;
// if (isStaging()) url = process.env.REACT_APP_STAGING_API_URL + (demo ? "/demo" : "") + partial;
return url;
};
// export const objectQueryParams = (scope: Scope) => {
// return "?" + scope.kind + "_id=" + scope.key;
// };
export default function PondProvider(props: PropsWithChildren<any>) {
const { children } = props;
return (
<UserProvider>
{children}
</UserProvider>
);
}
export {
useUserAPI,
};