Initial commit from monorepo

This commit is contained in:
Ruslan Bakiev
2026-01-07 09:10:35 +07:00
commit 3db50d9637
371 changed files with 43223 additions and 0 deletions

17
app/plugins/me.server.ts Normal file
View File

@@ -0,0 +1,17 @@
import { useLocationStore } from '~/stores/location'
export default defineNuxtPlugin(() => {
const nuxtApp = useNuxtApp()
const me = nuxtApp.ssrContext?.event.context.me ?? null
const state = useState('me', () => null)
if (me) {
state.value = me
// Заполнить locationStore сразу на сервере для SSR
const locationStore = useLocationStore()
if (me.activeTeam?.selectedLocation) {
locationStore.setFromUserData(me.activeTeam.selectedLocation)
}
}
})