My last commit while I am still 35

This commit is contained in:
Koper
2023-12-07 23:57:02 +07:00
parent e17bc4c708
commit e89db60b58
3 changed files with 11 additions and 6 deletions

View File

@@ -13,6 +13,7 @@ export const DomainContext = createContext<DomainContextType>({
},
api_url: "",
websocket_url: "",
zulip_streams: "",
});
export const DomainContextProvider = ({
@@ -42,7 +43,7 @@ export const featureEnabled = (
featureName: "requireLogin" | "privacy" | "browse" | "sendToZulip",
) => {
const context = useContext(DomainContext);
console.log(context.features, featureName);
return context.features[featureName] as boolean | undefined;
};