Skip to content

Commit

Permalink
fix: deepsource bug fix
Browse files Browse the repository at this point in the history
fix: deepsource bug fix
  • Loading branch information
eralpozcan authored May 30, 2023
2 parents 767d63f + 8bd786d commit 607485f
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 24 deletions.
4 changes: 2 additions & 2 deletions src/components/AppleTree.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script setup>
import AppleTree from '@/components/icons/AppleTree.vue'
import { useAppleTreeStore } from '../stores/index'
import { useAppleTreeStore } from '@/stores/index'
const appleStore = useAppleTreeStore()
</script>

<template>
<div :class="{ shake: appleStore.shackingStatus }" @contextmenu.prevent>
<AppleTree class="apple-tree" @click="appleStore.shakeTree()"></AppleTree>
<AppleTree class="apple-tree" @click="appleStore.shakeTree()" />
</div>
</template>

Expand Down
10 changes: 3 additions & 7 deletions src/components/Apples.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import { onMounted } from "vue";
import { useAppleTreeStore } from "../stores/index";
import { useAppleTreeStore } from "@/stores/index";
const appleStore = useAppleTreeStore();
onMounted(() => {
Expand All @@ -10,12 +10,8 @@ onMounted(() => {
</script>

<template>
<svg
v-show="!appleStore.appleIsGroundStatus"
id="apples"
class="red-apple"
:class="{ shake: appleStore.shackingStatus }"
></svg>
<svg v-show="!appleStore.appleIsGroundStatus" id="apples" class="red-apple"
:class="{ shake: appleStore.shackingStatus }"></svg>
</template>

<style scoped>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Basket.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script setup>
import Basket from "@/components/icons/Basket.vue";
import { useAppleTreeStore } from "../stores/index";
import { useAppleTreeStore } from "@/stores/index";
const appleStore = useAppleTreeStore();
</script>

<template>
<div class="basket" @contextmenu.prevent>
<svg v-show="appleStore.appleIsGroundStatus" id="basket_apples" class="basket_apple"></svg>
<Basket class="basket-icon"></Basket>
<Basket class="basket-icon" />
</div>
</template>

Expand Down
5 changes: 2 additions & 3 deletions src/components/EndScreen.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<script setup>
import { useAppleTreeStore } from "../stores/index";
import router from "../router";
import router from "@/router/index.js";
const appleStore = useAppleTreeStore();
function resetNow() {
appleStore.setAppleIsGroundStatus(false);
appleStore.setPlayingStatus(false);
appleStore.setAppleIsBasketStatus(false);
router.push({ name: "home" });
router.push({ name: "Home" });
}
</script>

Expand Down
4 changes: 2 additions & 2 deletions src/components/MainScreen.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import { useAppleTreeStore } from "../stores/index";
import router from "../router";
import { useAppleTreeStore } from "@/stores/index";
import router from "@/router/index.js";
const appleStore = useAppleTreeStore();
function playNow() {
Expand Down
5 changes: 1 addition & 4 deletions src/views/GameView.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<script setup>
import { onBeforeRouteLeave } from "vue-router";
import Apples from "@/components/Apples.vue";
import AppleTree from "@/components/AppleTree.vue";
import GroundGrass from "@/components/GroundGrass.vue";
import Basket from "@/components/Basket.vue";
import EndScreen from "@/components/EndScreen.vue";
import { useAppleTreeStore } from "../stores/index";
import { useAppleTreeStore } from "@/stores/index";
const appleStore = useAppleTreeStore();
</script>
Expand All @@ -22,4 +20,3 @@ const appleStore = useAppleTreeStore();
<GroundGrass></GroundGrass>
</template>
</template>
<style scoped></style>
2 changes: 1 addition & 1 deletion src/views/HomeView.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup>
import MainScreen from "../components/MainScreen.vue";
import MainScreen from "@/components/MainScreen.vue";
</script>

<template>
Expand Down
6 changes: 3 additions & 3 deletions src/views/NotFoundView.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script setup lang="js">
import router from "../router";
<script setup>
import router from "@/router/index.js";
function GoBackHome() {
router.push({ path: "/" });
router.push({ name: "Home" });
}
</script>

Expand Down

1 comment on commit 607485f

@vercel
Copy link

@vercel vercel bot commented on 607485f May 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.