Skip to content

Commit

Permalink
fix: message.
Browse files Browse the repository at this point in the history
  • Loading branch information
Horbin-Magician committed Apr 15, 2024
1 parent 76c26a2 commit 913a938
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions front-end/src/pages/SecretPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
import { checkLoginPromise } from '@/utils/userUtils';
import { getSecret, updateState, updateMessage } from '@/api/secretAPI'

const message = useMessage()
const router = useRouter()

// states
const secret_state = ref(-1); // -1: first see, 0: seen, 1: like, 2: dislike
let secret = null;
Expand Down Expand Up @@ -86,8 +89,6 @@
}

onMounted(() => {
const message = useMessage()
const router = useRouter()
checkLoginPromise().then((result) => {
if (!result) {
router.push('/')
Expand Down

0 comments on commit 913a938

Please sign in to comment.