Skip to content

Commit

Permalink
breadcrumb compute
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajandeep98 committed Dec 10, 2024
1 parent ed1af92 commit 5ab7d1d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/site/app/components/Sbc/Breadcrumb.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ function resolveBackHref () {
return ''
}
}
const isBackButtonDisabled = computed(() => {
return breadcrumbs.value.length <= 2
})
</script>
<template>
<div class="2xl: left-1 bg-bcGovColor-nonClickable sm:px-4">
Expand All @@ -30,7 +33,7 @@ function resolveBackHref () {
<UButton
class="mr-3 mt-px size-[28px] rounded-full px-1 text-blue-500"
color="white"
:disabled="breadcrumbs.length <= 2"
:disabled="isBackButtonDisabled"
icon="i-mdi-arrow-left"
:aria-label="$t('sbcBreadcrumb.backBtn')"
data-cy="crumb-back"
Expand Down

0 comments on commit 5ab7d1d

Please sign in to comment.