Skip to content

Commit

Permalink
a little rearangment
Browse files Browse the repository at this point in the history
  • Loading branch information
daiagi committed Apr 10, 2023
1 parent 7c2c2f6 commit 9e1eef1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions components/common/NotificationBox/NotificationBoxModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,13 @@ const eventTypes = ref<string[]>([
Interaction.OFFER,
Interaction.ACCEPTED_OFFER,
])
const collectionFilter = ref<FilterOption | null>(null)
const eventFilter = ref<string[]>([])
const showFilter = ref(false)
const emit = defineEmits(['close'])
const { collections, events: allEvents } = useNotification()
const collectionFilter = ref<FilterOption | null>(null)
const toggleCollectionFilter = (target: FilterOption) => {
if (collectionFilter.value?.id === target.id) {
collectionFilter.value = null
Expand All @@ -131,7 +134,6 @@ const toggleCollectionFilter = (target: FilterOption) => {
}
}
const eventFilter = ref<string[]>([])
const toggleEventFilter = (target) => {
const index = eventFilter.value.findIndex((x) => x === target)
if (index === -1) {
Expand All @@ -141,7 +143,6 @@ const toggleEventFilter = (target) => {
}
}
const showFilter = ref(false)
const isFilterEmpty = computed(
() => !collectionFilter.value && eventFilter.value.length === 0
)
Expand All @@ -155,8 +156,6 @@ const displayedEvents = computed(() =>
eventFilter.value.some((x) => x === item.interaction))
)
)
const emit = defineEmits(['close'])
</script>
<style scoped lang="scss">
Expand Down

0 comments on commit 9e1eef1

Please sign in to comment.