Skip to content

Commit

Permalink
chore: pinia removed (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
hmbanan666 authored Aug 23, 2024
1 parent b63bf1c commit ecedc75
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- created
push:
paths-ignore:
- ".md"
- '.md'
branches:
- main

Expand Down
2 changes: 1 addition & 1 deletion apps/website/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ export default defineNuxtConfig({
cookieKey: '', // NUXT_PUBLIC_COOKIE_KEY
},
},
modules: ['@nuxt/eslint', '@vueuse/nuxt', '@pinia/nuxt'],
modules: ['@nuxt/eslint', '@vueuse/nuxt'],
compatibilityDate: '2024-08-18',
})
6 changes: 3 additions & 3 deletions apps/website/src/components/MenuHamburger.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script setup lang="ts">
const website = useWebsiteStore()
const { isMobileMenuOpened } = useApp()
</script>

<template>
<button
class="burger"
:class="{ open: website.isMobileMenuOpened }"
@click="() => (website.isMobileMenuOpened = !website.isMobileMenuOpened)"
:class="{ open: isMobileMenuOpened }"
@click="() => (isMobileMenuOpened = !isMobileMenuOpened)"
>
<svg width="32" height="24">
<line id="top" x1="0" y1="2" x2="32" y2="2" />
Expand Down
4 changes: 2 additions & 2 deletions apps/website/src/components/MenuProfile.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script setup lang="ts">
const { public: publicEnv } = useRuntimeConfig()
const website = useWebsiteStore()
const { isFeedOpened } = useApp()
const handleMenuClick = () => {
website.isFeedOpened = !website.isFeedOpened
isFeedOpened = !isFeedOpened
}
const url = new URL('https://id.twitch.tv/oauth2/authorize')
Expand Down
6 changes: 3 additions & 3 deletions apps/website/src/components/MenuSmartphone.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script setup lang="ts">
const website = useWebsiteStore()
const { isMobileMenuOpened } = useApp()
function closeSidebar() {
website.isMobileMenuOpened = false
isMobileMenuOpened = false
}
</script>

<template>
<aside :class="{ open: website.isMobileMenuOpened }">
<aside :class="{ open: isMobileMenuOpened }">
<nav>
<ul>
<li :aria-current="$route.path === `/` ? 'page' : undefined">
Expand Down
21 changes: 21 additions & 0 deletions apps/website/src/composables/useApp.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
function _useApp() {
const route = useRoute()

const isMobileMenuOpened = ref(false)
const isFeedOpened = ref(false)

watch(
() => route.fullPath,
() => {
isMobileMenuOpened.value = false
isFeedOpened.value = false
}
)

return {
isMobileMenuOpened,
isFeedOpened,
}
}

export const useApp = createSharedComposable(_useApp)
6 changes: 0 additions & 6 deletions apps/website/src/stores/website.ts

This file was deleted.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"@nx/vite": "19.6.2",
"@nx/web": "19.6.2",
"@nx/workspace": "19.6.2",
"@pinia/nuxt": "^0.5.3",
"@playwright/test": "^1.36.0",
"@swc-node/register": "~1.9.1",
"@swc/core": "~1.5.7",
Expand Down Expand Up @@ -89,7 +88,6 @@
"lint-staged": "^15.2.7",
"nuxt": "^3.10.0",
"nx": "19.6.2",
"pinia": "^2.2.2",
"prettier": "^2.6.2",
"prisma": "^5.18.0",
"typescript": "^5.5.2",
Expand Down
28 changes: 2 additions & 26 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2366,7 +2366,7 @@
pathe "^1.1.2"
unimport "^3.10.0"

"@nuxt/[email protected]", "@nuxt/kit@^3.10.0", "@nuxt/kit@^3.11.2", "@nuxt/kit@^3.12.2", "@nuxt/kit@^3.12.4", "@nuxt/kit@^3.9.0":
"@nuxt/[email protected]", "@nuxt/kit@^3.10.0", "@nuxt/kit@^3.11.2", "@nuxt/kit@^3.12.2", "@nuxt/kit@^3.12.4":
version "3.12.4"
resolved "https://registry.yarnpkg.com/@nuxt/kit/-/kit-3.12.4.tgz#b7073611d533ac32b504d95664074be3587046b3"
integrity sha512-aNRD1ylzijY0oYolldNcZJXVyxdGzNTl+Xd0UYyFQCu9f4wqUZqQ9l+b7arCEzchr96pMK0xdpvLcS3xo1wDcw==
Expand Down Expand Up @@ -2853,14 +2853,6 @@
dependencies:
esquery "^1.4.0"

"@pinia/nuxt@^0.5.3":
version "0.5.3"
resolved "https://registry.yarnpkg.com/@pinia/nuxt/-/nuxt-0.5.3.tgz#d9de0653e36011d859e42917480b09c814ab6197"
integrity sha512-AEuHEcaxZdAl73qUOco1TpOGjcmn83nJlYORZ63zhufSCVMj28lPq15ZnfhhofwBh5IjkT/lB7d8Ff958LajDQ==
dependencies:
"@nuxt/kit" "^3.9.0"
pinia "2.2.1"

"@pixi/colord@^2.9.6":
version "2.9.6"
resolved "https://registry.yarnpkg.com/@pixi/colord/-/colord-2.9.6.tgz#7e4e7851480da6fd3cef4e331f008d60be7e1204"
Expand Down Expand Up @@ -10255,22 +10247,6 @@ pify@^4.0.1:
resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==

[email protected]:
version "2.2.1"
resolved "https://registry.yarnpkg.com/pinia/-/pinia-2.2.1.tgz#7cf860f6a23981c23e58605cee45496ce46d15d1"
integrity sha512-ltEU3xwiz5ojVMizdP93AHi84Rtfz0+yKd8ud75hr9LVyWX2alxp7vLbY1kFm7MXFmHHr/9B08Xf8Jj6IHTEiQ==
dependencies:
"@vue/devtools-api" "^6.6.3"
vue-demi "^0.14.10"

pinia@^2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/pinia/-/pinia-2.2.2.tgz#dcf576c9a778187d1542c5e6a9f8b8cd5b6aea14"
integrity sha512-ja2XqFWZC36mupU4z1ZzxeTApV7DOw44cV4dhQ9sGwun+N89v/XP7+j7q6TanS1u1tdbK4r+1BUx7heMaIdagA==
dependencies:
"@vue/devtools-api" "^6.6.3"
vue-demi "^0.14.10"

pirates@^4.0.6:
version "4.0.6"
resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9"
Expand Down Expand Up @@ -12848,7 +12824,7 @@ vue-component-type-helpers@^2.0.0:
resolved "https://registry.yarnpkg.com/vue-component-type-helpers/-/vue-component-type-helpers-2.0.29.tgz#3e476321482526c63b3bbe3771eae1ad55f58a01"
integrity sha512-58i+ZhUAUpwQ+9h5Hck0D+jr1qbYl4voRt5KffBx8qzELViQ4XdT/Tuo+mzq8u63teAG8K0lLaOiL5ofqW38rg==

vue-demi@>=0.14.10, vue-demi@^0.14.10:
vue-demi@>=0.14.10:
version "0.14.10"
resolved "https://registry.yarnpkg.com/vue-demi/-/vue-demi-0.14.10.tgz#afc78de3d6f9e11bf78c55e8510ee12814522f04"
integrity sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==
Expand Down

0 comments on commit ecedc75

Please sign in to comment.