refactor: use css theme variables, enforce strict typing without any and remove dead Hero component
This commit is contained in:
+3
-8
@@ -1,6 +1,7 @@
|
||||
import { getPayload } from 'payload'
|
||||
import configPromise from '../src/payload.config'
|
||||
import { toSlug } from '@intecion/ipal-kit'
|
||||
import type { Page } from '../src/payload-types'
|
||||
|
||||
const PAGES = [
|
||||
{ pl: 'Strona główna', de: 'Startseite', isHome: true },
|
||||
@@ -177,7 +178,6 @@ async function run() {
|
||||
const pageIds: number[] = [];
|
||||
|
||||
for (const page of PAGES) {
|
||||
// @ts-ignore
|
||||
const createdPage = await payload.create({
|
||||
collection: 'pages',
|
||||
data: {
|
||||
@@ -188,14 +188,13 @@ async function run() {
|
||||
blockType: 'TextSection',
|
||||
text: 'Treść w przygotowaniu',
|
||||
}
|
||||
]) as any
|
||||
]) as unknown as Page['layout']
|
||||
},
|
||||
locale: 'pl',
|
||||
});
|
||||
|
||||
pageIds.push(createdPage.id as unknown as number);
|
||||
|
||||
// @ts-ignore
|
||||
await payload.update({
|
||||
collection: 'pages',
|
||||
id: createdPage.id,
|
||||
@@ -207,7 +206,7 @@ async function run() {
|
||||
blockType: 'TextSection',
|
||||
text: 'Inhalt in Vorbereitung',
|
||||
}
|
||||
]) as any
|
||||
]) as unknown as Page['layout']
|
||||
},
|
||||
locale: 'de',
|
||||
});
|
||||
@@ -216,7 +215,6 @@ async function run() {
|
||||
}
|
||||
|
||||
console.log('Seeding global header...')
|
||||
// @ts-ignore
|
||||
await payload.updateGlobal({
|
||||
slug: 'header',
|
||||
data: {
|
||||
@@ -225,7 +223,6 @@ async function run() {
|
||||
});
|
||||
|
||||
console.log('Seeding global company info...')
|
||||
// @ts-ignore
|
||||
await payload.updateGlobal({
|
||||
slug: 'company',
|
||||
data: {
|
||||
@@ -241,7 +238,6 @@ async function run() {
|
||||
const footerNavIndices = [0, 1, 2, 3, 4, 5, 7, 8, 9];
|
||||
const footerNavPages = footerNavIndices.map(index => ({ page: pageIds[index] }));
|
||||
|
||||
// @ts-ignore
|
||||
await payload.updateGlobal({
|
||||
slug: 'footer',
|
||||
data: {
|
||||
@@ -254,7 +250,6 @@ async function run() {
|
||||
});
|
||||
|
||||
console.log('Seeding site-settings (homepage)...')
|
||||
// @ts-ignore
|
||||
await payload.updateGlobal({
|
||||
slug: 'site-settings',
|
||||
data: {
|
||||
|
||||
Reference in New Issue
Block a user