I'm having trouble getting my components to work within Vue CLI. Here is my current file structure:
https://i.sstatic.net/cgI0F.png
My goal is to utilize the GameHub
and GamesAdmin
components in the following manner:
<template>
<div>
<game-admin v-if="user.admin == 1"></game-admin>
<game-hub v-else></game-hub>
</div>
</template>
<script>
import { gameAdmin } from '../components/GamesAdmin';
import { gameHub } from '../components/GameHub';
export default {
data(){
return{
}
},
components: {
gameAdmin : 'gameAdmin',
gameHub : 'gameHub'
},
props:[
'user',
],
}
</script>
However, I am encountering the following error:
https://i.sstatic.net/sn3O5.png
I am struggling to identify what may be causing this issue. Can anyone provide insight into the problem?