-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.vue
42 lines (35 loc) · 856 Bytes
/
app.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<script setup lang="ts">
import {getSessionContext} from "@shopware-pwa/api-client";
import {SessionContext} from "@shopware-pwa/types";
useHead({
title: "Agravis Stele",
meta: [
{name: "description", content: "Agravis Stele"},
{'http-equiv': 'refresh', content: '1800'},
],
htmlAttrs: {
lang: "de",
},
});
const {refreshSessionContext} = useSessionContext();
onBeforeMount(async () => {
await refreshSessionContext();
});
const {apiInstance} = useShopwareContext();
const {data: sessionContextData} = await useAsyncData(
"sessionContext",
async () => {
return await getSessionContext(apiInstance);
}
);
useSessionContext(sessionContextData.value as SessionContext);
</script>
<template>
<NuxtLayout>
<NuxtPage/>
</NuxtLayout>
</template>
<style>
body {
}
</style>