|
|
@@ -51,23 +51,24 @@ const props = defineProps({
|
|
51
|
51
|
},
|
|
52
|
52
|
})
|
|
53
|
53
|
// from the computed section
|
|
54
|
|
-const currentCard = computed(() => this.profiles[this.profiles.length - 1]);
|
|
|
54
|
+const currentCard = computed(() => props.profiles[props.profiles.length - 1]);
|
|
55
|
55
|
// from the method section
|
|
56
|
56
|
const logOut = () => {};
|
|
57
|
57
|
const reject = () => {
|
|
58
|
|
- this.swipped(this.currentCard)
|
|
|
58
|
+ swipped(currentCard)
|
|
59
|
59
|
}
|
|
60
|
60
|
const swipped = profile => {
|
|
61
|
|
- const index = this.profiles.findIndex(u => u.uid == profile.uid)
|
|
62
|
|
- this.profiles.splice(index, 1)
|
|
|
61
|
+ const index = props.profiles.findIndex(u => u.uid == profile.uid)
|
|
|
62
|
+ props.profiles.splice(index, 1)
|
|
63
|
63
|
profile.id = Date.now() + (Math.random() * 100000).toFixed()
|
|
64
|
|
- this.profiles.unshift({ ...profile })
|
|
|
64
|
+ props.profiles.unshift({ ...profile })
|
|
65
|
65
|
}
|
|
66
|
66
|
const getUser = () => {
|
|
67
|
67
|
}
|
|
68
|
68
|
const onRequest = () => {
|
|
69
|
|
- const data = { ...this.currentCard }
|
|
|
69
|
+ const data = { ...currentCard }
|
|
70
|
70
|
}
|
|
|
71
|
+// AHP Button behavior
|
|
71
|
72
|
const accept = () => {
|
|
72
|
73
|
console.log('accepted')
|
|
73
|
74
|
}
|