Tiny fixes + start pre-rendering
This commit is contained in:
parent
5a07064eee
commit
57ba033a91
|
@ -26,6 +26,7 @@ export const useContentStore = (mapKey = 'id') => {
|
|||
}
|
||||
|
||||
function save(items) {
|
||||
if (!items) return
|
||||
if (!Array.isArray(items)) items = [items]
|
||||
items.forEach((item) => {
|
||||
content.value.set(item[mapKey], item)
|
||||
|
|
|
@ -12,14 +12,16 @@ if (opnformConfig.sentry_dsn) {
|
|||
modules.push('@nuxtjs/sentry')
|
||||
}
|
||||
|
||||
const cachedRoutes = [
|
||||
const preRenderedRoutes = [
|
||||
'/',
|
||||
'/ai-form-builder',
|
||||
'/login',
|
||||
'/register',
|
||||
'/privacy-policy',
|
||||
'/terms-conditions',
|
||||
].reduce((acc, curr) => (acc[curr] = {swr: 60 * 60}, acc), {});
|
||||
// '/privacy-policy',
|
||||
// '/terms-conditions',
|
||||
'/templates',
|
||||
'/templates/*',
|
||||
].reduce((acc, curr) => (acc[curr] = {prerender: true}, acc), {});
|
||||
|
||||
export default defineNuxtConfig({
|
||||
devtools: {enabled: true},
|
||||
|
@ -55,8 +57,5 @@ export default defineNuxtConfig({
|
|||
},
|
||||
'~/components',
|
||||
],
|
||||
routeRules: { ... cachedRoutes},
|
||||
devServer: {
|
||||
https: true,
|
||||
}
|
||||
routeRules: { ... preRenderedRoutes}
|
||||
})
|
||||
|
|
|
@ -55,7 +55,7 @@ export const loadAllTemplates = async (store, options={}) => {
|
|||
if (!store.allLoaded) {
|
||||
store.startLoading()
|
||||
store.initTypesAndIndustries()
|
||||
const {data} = await fetchAllTemplates(options)
|
||||
const {data,error} = await fetchAllTemplates(options)
|
||||
store.set(data.value)
|
||||
store.stopLoading()
|
||||
store.allLoaded = true
|
||||
|
|
|
@ -11,12 +11,6 @@
|
|||
],
|
||||
"license": "MIT",
|
||||
"type": "project",
|
||||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/JhumanJ/laravel-notion-api.git"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^8.2",
|
||||
"ext-json": "*",
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -17,7 +17,6 @@
|
|||
"axios": "^0.21.1",
|
||||
"chart.js": "^4.4.0",
|
||||
"clone-deep": "^4.0.1",
|
||||
"crisp-sdk-web": "^1.0.21",
|
||||
"date-fns": "^2.28.0",
|
||||
"debounce": "^1.2.1",
|
||||
"fuse.js": "^6.4.6",
|
||||
|
|
Loading…
Reference in New Issue