Skip to content

Commit 0775780

Browse files
committed
notification is a link
1 parent de3bcb7 commit 0775780

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

frontend/src/components/shared/NavBarBell.vue

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,16 @@
2222
'z-50': true,
2323
'rounded-md': true}">
2424
<div v-bind:class="{
25-
'py-4': true,
26-
'flex': true,
2725
'word-break': true,
28-
'items-center': true,
2926
'border-b': true,
3027
'font-bold': notification.is_seen,}"
3128
v-for="notification in notifications" :key="notification.id">
32-
<img v-bind:src="getImage(notification.type)" class="w-4 h-4">
33-
<h1 class="ml-4">{{notification.text}}</h1>
29+
<router-link
30+
v-bind:to="notification.link_to"
31+
class="py-4 flex items-center word-break cursor-pointer">
32+
<img v-bind:src="getImage(notification.type)" class="w-4 h-4">
33+
<h1 class="ml-4">{{notification.content}}</h1>
34+
</router-link>
3435
</div>
3536
</div>
3637
</div>
@@ -50,16 +51,16 @@ export default {
5051
data: () => ({
5152
notify: true,
5253
notifications: [
53-
{ text: 'Samantha liked you', is_seen: false, type: 'like', id: 1 },
54-
{ text: 'Bae liked you', id: 2, is_seen: false, type: 'dislike' },
55-
{ text: 'Samantha liked you', id: 3, is_seen: false, type: 'message' },
56-
{ text: 'Bae liked you', id: 4, is_seen: false, type: 'match' },
57-
{ text: 'Samantha liked you', id: 5, is_seen: true, type: 'view' },
58-
{ text: 'Bae liked you', id: 6, is_seen: true, type: 'like' },
59-
{ text: 'Samantha liked you', id: 7, is_seen: true, type: 'like' },
60-
{ text: 'Bae liked you', id: 8, is_seen: true, type: 'like' },
61-
{ text: 'Samantha liked you', id: 9, is_seen: true, type: 'like' },
62-
{ text: 'Bae liked youBae liked youBae liked youBae liked youBae liked youBae liked you', id: 10, is_seen: true, type: 'like' },
54+
{ content: 'Samantha liked you', is_seen: false, type: 'like', id: 1, link_to: 'google.com' },
55+
{ content: 'Bae liked you', id: 2, is_seen: false, type: 'dislike', link_to: 'google.com' },
56+
{ content: 'Samantha liked you', id: 3, is_seen: false, type: 'message', link_to: 'google.com' },
57+
{ content: 'Bae liked you', id: 4, is_seen: false, type: 'match', link_to: 'google.com' },
58+
{ content: 'Samantha liked you', id: 5, is_seen: true, type: 'view', link_to: 'google.com' },
59+
{ content: 'Bae liked you', id: 6, is_seen: true, type: 'like', link_to: 'google.com' },
60+
{ content: 'Samantha liked you', id: 7, is_seen: true, type: 'like', link_to: 'google.com' },
61+
{ content: 'Bae liked you', id: 8, is_seen: true, type: 'like', link_to: 'google.com' },
62+
{ content: 'Samantha liked you', id: 9, is_seen: true, type: 'like', link_to: 'google.com' },
63+
{ content: 'Bae liked youBae liked youBae liked youBae liked youBae liked youBae liked you', id: 10, is_seen: true, type: 'like', link_to: 'google.com' },
6364
],
6465
showNotifications: false,
6566
}),

0 commit comments

Comments
 (0)