UNPKG

gridsome

Version:

A JAMstack framework for building blazing fast websites with Vue.js

27 lines (21 loc) 540 B
import { getResults } from './shared' export default { computed: { $context () { if (process.isServer) { return this.$ssrContext.state.context || {} } const { path } = this.$route const results = getResults(path) return results ? results.context : {} }, $page () { if (process.isServer) { return this.$ssrContext.state.data || null } const { path } = this.$route const results = getResults(path) return results ? results.data : null } } }