import AppContext from "@ctx/AppContext";
import React, { useContext } from "react";

export const HasPermission = (permission) => {
  const CTX = useContext(AppContext);
  const permissions = CTX.state.profile?.permissions;
  return permissions?.includes(permission);
};
