Skip to content

Commit

Permalink
Improved: logic for rendering gitbook search tab button (hotwax#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed Jun 18, 2024
1 parent 174b885 commit 0b58762
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/views/Tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
<ion-icon :icon="storefrontOutline" />
<ion-label>{{ translate("Product store") }}</ion-label>
</ion-tab-button>
<ion-tab-button tab="help" @click="update()">
<ion-icon :icon="helpOutline" />
<ion-label>{{ translate("Help") }}</ion-label>
</ion-tab-button>

<DxpGitBookSearch />

<ion-tab-button tab="more" href="/tabs/settings">
<ion-icon :icon="settingsOutline" />
<ion-label>{{ translate("Settings") }}</ion-label>
Expand All @@ -23,23 +22,15 @@
<script setup lang="ts">
import { translate } from "@/i18n";
import { IonIcon, IonLabel, IonPage, IonRouterOutlet, IonTabBar, IonTabButton, IonTabs } from "@ionic/vue";
import { helpOutline, settingsOutline, storefrontOutline } from "ionicons/icons";
import { settingsOutline, storefrontOutline } from "ionicons/icons";
import { useRouter } from "vue-router";
import { openGitBookSearchModal } from "@hotwax/dxp-components";
const router = useRouter();
function showFooter() {
if (['/tabs/product-store', '/tabs/settings'].includes(router.currentRoute.value.path)) return true
return false
}
function update() {
console.log('udpate');
openGitBookSearchModal();
}
</script>

<style scoped>
Expand Down

0 comments on commit 0b58762

Please sign in to comment.