Skip to content

Commit d01c441

Browse files
committed
redirect notification to correct route
1 parent 2366176 commit d01c441

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

frontend/src/components/shared/NavBarBell.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
<router-link
3232
v-if="notification.link_to"
33-
v-bind:to="notification.link_to"
33+
v-bind:to="getLinkTo(notification.type, notification.link_to)"
3434
v-on:click.native="toggle"
3535
class="py-4 flex items-center word-break cursor-pointer">
3636
<img v-bind:src="getImage(notification.type)" class="w-4 h-4">
@@ -82,6 +82,12 @@ export default {
8282
fetchNotificationsIntervalId: null,
8383
}),
8484
methods: {
85+
getLinkTo(type, link) {
86+
if (type === 'match' || type === 'message' || type === 'message_like') {
87+
return '/matches';
88+
}
89+
return link;
90+
},
8591
async makeNotificationsSeen() {
8692
const length = this.notifications.length;
8793
for (let i = 0; i < length; i += 1) {

0 commit comments

Comments
 (0)