Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/SLB-295-Breadcrumbs' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Luqmaan Essop committed May 8, 2024
2 parents ffcb9e5 + c620f8f commit 20f0123
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/ui/src/components/Molecules/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { useBreadcrumbs } from '../Routes/Menu';
export function BreadCrumbs({ className }: { className?: string }) {
const breadcrumbs = useBreadcrumbs();

console.log('breadcrumbs:', breadcrumbs);

if (!breadcrumbs.length) {
return null;
}
Expand Down
3 changes: 3 additions & 0 deletions packages/ui/src/components/Routes/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export function useMenus() {
const intl = useIntl();
const locale = intl.locale;
const settings = useOperation(FrameQuery).data;

console.log('settings:', settings);
return {
main: settings?.mainNavigation
?.filter((nav) => nav?.locale === locale)
Expand Down Expand Up @@ -88,5 +90,6 @@ export function useMenuAncestors(path: string, menuName: MenuNameType) {

export const useBreadcrumbs = (menuName?: MenuNameType, path?: string) => {
const currentPath = useCurrentPath();
console.log('currentPath', currentPath);
return useMenuAncestors(path || currentPath || '', menuName || 'main');
};

0 comments on commit 20f0123

Please sign in to comment.