@acvl/frontend-components 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -22705,7 +22705,7 @@ const ControlledDate = (props) => {
22705
22705
 
22706
22706
  const useHasPermission = (path) => {
22707
22707
  const session = core.useSession();
22708
- return !!lodash.get(session, `user.permissions.${path}`);
22708
+ return !!lodash.get(session, `extraUserInfo.permissions.${path}`);
22709
22709
  };
22710
22710
 
22711
22711
  const APIContext = React.createContext(null);
@@ -22731,7 +22731,20 @@ const useNavigation = () => {
22731
22731
  if (!context) {
22732
22732
  throw new Error('useNavigation debe ser utilizado dentro de un NavigationContextProvider');
22733
22733
  }
22734
- return context.hook;
22734
+ const navigate = context.hook();
22735
+ const response = {
22736
+ push: undefined,
22737
+ back: undefined,
22738
+ };
22739
+ if (typeof navigate === 'function') {
22740
+ response.push = navigate;
22741
+ response.back = navigate(-1);
22742
+ }
22743
+ else {
22744
+ response.push = navigate.push;
22745
+ response.back = navigate.back();
22746
+ }
22747
+ return response;
22735
22748
  };
22736
22749
  // // Inside your shared library
22737
22750
  // export const MyCustomLink = ({ href, children, component: Component = 'a', ...props }) => {