I have a Nuxt SSR app which need to open new window on link click, but new window does not have actual data in the store. There are only default values. How can I share actual values in the store between this two pagaes?
This is the code of new page which ask for currency value:
<template>
<DeviceDetail :pdevice="device" :location="location" />
</template>
<script>
import { defineComponent } from '@nuxtjs/composition-api'
export default defineComponent({
async asyncData(context) {
try {
const deviceId = context.params.device_id.split('-').pop() // url == device-name-id
const currency = context.store.state.i18.currency // This is a problem
const route = context.route
const { data: device } = await context.$api.devices.getDeviceDetail(
deviceId,
currency
)
const locationId = device.data.location_id
const { data: location } = await context.$api.locations.getLocation(
locationId
)
return {
device: device.data,
location: location.data,
}
} catch (error) {
console.error(error)
}
},
data() {
return {
device: null,
location: null,
}
},
})
</script>