1
0
forked from noxious/client

improved if/else logics

This commit is contained in:
Dennis Postma 2024-05-16 00:32:29 +02:00
parent a4f332deba
commit d22a7b769b

View File

@ -17,12 +17,16 @@ const screen:Ref<string> = ref('login');
const socket = useSocketStore();
socket.$subscribe((mutation, state) => {
if (state.isAuthenticated) {
screen.value = 'character_selection';
if (!state.isAuthenticated) {
screen.value = 'login';
}
if (state.character) {
screen.value = 'game';
if (state.isAuthenticated){
screen.value = 'characters';
if (state.character) {
screen.value = 'game';
}
}
}, { detached: true })
</script>