From 5ecbec478fa03323e061aaab9b6a6648cac1912b Mon Sep 17 00:00:00 2001 From: webshunternet Date: Mon, 16 Sep 2024 20:03:05 +0700 Subject: [PATCH] update page wedding --- pages/api/wedding.ts | 3 +++ pages/monthly-release/page/[page].tsx | 6 ++++-- pages/pages/wedding.tsx | 21 ++++++++++++--------- schemas/wedding/wedding.ts | 7 ++++--- schemas/wedding/weddingPackage.ts | 6 +++--- schemas/wedding/weddingpost.ts | 2 +- 6 files changed, 27 insertions(+), 18 deletions(-) diff --git a/pages/api/wedding.ts b/pages/api/wedding.ts index 904ae15..c0836ff 100644 --- a/pages/api/wedding.ts +++ b/pages/api/wedding.ts @@ -18,6 +18,7 @@ export const getWedding = async () => { title, subtitle, "coverImageUrl": coverImage.asset->url, + pixiesetURL, descriptionTitle, content[]{ children[]{ @@ -52,11 +53,13 @@ export const getWedding = async () => { } } +// eslint-disable-next-line import/no-anonymous-default-export export default async (req, res) => { const query = `*[_type == "WeddingSection"][]{ title, subtitle, "coverImageUrl": coverImage.asset->url, + pixiesetURL, descriptionTitle, content[]{ children[]{ diff --git a/pages/monthly-release/page/[page].tsx b/pages/monthly-release/page/[page].tsx index 4e3b214..a8cba40 100644 --- a/pages/monthly-release/page/[page].tsx +++ b/pages/monthly-release/page/[page].tsx @@ -163,7 +163,7 @@ export default function page(props) {
  • { console.log('params', params) + let pagehal = params && params.page ? Number(params.page) : 1 const { posts, paginations } = await getPage( url, '/monthly-release/page/', - (typeof params.page === 'number' ? params.page : '1') + pagehal ) return { props: { newsroomposts: posts, paginations, + pageActive: pagehal, }, } } diff --git a/pages/pages/wedding.tsx b/pages/pages/wedding.tsx index 73cb48c..314bf29 100644 --- a/pages/pages/wedding.tsx +++ b/pages/pages/wedding.tsx @@ -48,6 +48,7 @@ const ContentTag = ({ dat }: any) => { ) : (<>) } +//wedding packages const ContentTag2 = ({ dat }: any) => { return Array.isArray(dat) ? (<> {dat.map((v: any, i) => @@ -160,8 +161,8 @@ export default function Wedding(props) {
    -
    -

    {props.dt?.descriptionTitle}

    +
    +

    {props.dt?.descriptionTitle}

    @@ -179,8 +180,8 @@ export default function Wedding(props) {
    - - Enchanted Wedding in GWK Cultural Park + + View more photos in the Gallery
    @@ -201,17 +202,19 @@ export default function Wedding(props) { ))}
    -
    +

    Connect With Us to Get Extraordinary Offer

    - - 62 896-1059-5452 + + + 62 896-1059-5452 +
    - - bookmywedding@gwkbali.com + + bookmywedding@gwkbali.com
    diff --git a/schemas/wedding/wedding.ts b/schemas/wedding/wedding.ts index f7178df..e0ad993 100644 --- a/schemas/wedding/wedding.ts +++ b/schemas/wedding/wedding.ts @@ -1,3 +1,4 @@ +/* eslint-disable import/no-anonymous-default-export */ import { format, parseISO } from 'date-fns' import { TiPuzzleOutline } from 'react-icons/ti' import { defineField, defineType } from 'sanity' @@ -17,14 +18,14 @@ export default { title: 'Title Page', description: 'Judul halaman', type: 'string', - validation: (rule) => rule.required(), + // validation: (rule) => rule.required(), }, { name: 'subtitle', title: 'Sub Title Page', description: 'Sub judul halaman', type: 'string', - validation: (rule) => rule.required(), + // validation: (rule) => rule.required(), }, { name: 'coverImage', @@ -45,7 +46,7 @@ export default { defineField({ name: 'content', title: 'Description', - description: 'kontent deskripsi', + description: 'Paragraf utama', type: 'array', of: [{ type: 'block' }], }), diff --git a/schemas/wedding/weddingPackage.ts b/schemas/wedding/weddingPackage.ts index c52b45d..233bc92 100644 --- a/schemas/wedding/weddingPackage.ts +++ b/schemas/wedding/weddingPackage.ts @@ -7,7 +7,7 @@ import authorType from '../author' export default defineType({ name: 'weddingpackage', - title: 'Wedding Main Page', + title: 'Wedding Brosur', icon: TiCalendarOutline, type: 'document', fields: [ @@ -19,7 +19,7 @@ export default defineType({ }), defineField({ name: 'content', - title: 'Content Wedding', + title: 'Detail paket wedding', type: 'array', of: [{ type: 'block', @@ -59,7 +59,7 @@ export default defineType({ }), defineField({ name: 'fileWedding', - title: 'File Wedding', + title: 'File Brosur', type: 'file', options: { accept: 'application/pdf', diff --git a/schemas/wedding/weddingpost.ts b/schemas/wedding/weddingpost.ts index 2d109fb..50c2548 100644 --- a/schemas/wedding/weddingpost.ts +++ b/schemas/wedding/weddingpost.ts @@ -47,7 +47,7 @@ export default defineType({ }), defineField({ name: 'galeryImage', - title: 'Galery Fotos', + title: 'Galery Photos', description: 'Tambahkan galery foto untuk halaman', type: 'array', of: [{ type: 'image' }],