import { usePlatformApi } from '@wix/yoshi-flow-bm';

export function usePlatformApiCompat(): Partial<
  ReturnType<typeof usePlatformApi>
> {
  try {
    // eslint-disable-next-line react-hooks/rules-of-hooks
    return usePlatformApi() ?? {};
  } catch (e) {
    console.error(e);
    return {};
  }
}
