We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1cb8b26 commit 71b4ea1Copy full SHA for 71b4ea1
1 file changed
resources/js/pages/v/index.vue
@@ -762,6 +762,10 @@ watch(isVideoLoaded, (newVal) => {
762
});
763
764
const likePost = async () => {
765
+ if (!authStore.isAuthenticated) {
766
+ authStore.openAuthModal("login");
767
+ return;
768
+ }
769
try {
770
await videoStore.likeVideo(currentVideo.value?.id);
771
} catch (error) {
@@ -770,6 +774,10 @@ const likePost = async () => {
774
};
775
772
776
const unlikePost = async () => {
777
778
779
780
773
781
782
await videoStore.unlikeVideo(currentVideo.value?.id);
783
0 commit comments