@@ -119,11 +110,19 @@ export function LearningResources(props: LearningResourcesSection) {
{featured.description}
diff --git a/apps/landing/src/collections/LearningResourcesSection.ts b/apps/landing/src/collections/LearningResourcesSection.ts
index 2689245..ddc8505 100644
--- a/apps/landing/src/collections/LearningResourcesSection.ts
+++ b/apps/landing/src/collections/LearningResourcesSection.ts
@@ -1,3 +1,4 @@
+// payload config
import { GlobalConfig } from 'payload';
export const LearningResourcesSection: GlobalConfig = {
@@ -22,31 +23,11 @@ export const LearningResourcesSection: GlobalConfig = {
type: 'array',
required: true,
fields: [
- {
- name: 'icon',
- type: 'text',
- required: true,
- },
- {
- name: 'title',
- type: 'text',
- required: true,
- },
- {
- name: 'description',
- type: 'textarea',
- required: true,
- },
- {
- name: 'buttonText',
- type: 'text',
- required: true,
- },
- {
- name: 'buttonLink',
- type: 'text',
- required: true,
- },
+ { name: 'icon', type: 'text', required: true },
+ { name: 'title', type: 'text', required: true },
+ { name: 'description', type: 'textarea', required: true },
+ { name: 'buttonText', type: 'text', required: true },
+ { name: 'buttonLink', type: 'text', required: true },
],
defaultValue: [
{
@@ -112,12 +93,24 @@ export const LearningResourcesSection: GlobalConfig = {
required: true,
defaultValue: 'Mulai Kursus',
},
+ {
+ name: 'primaryButtonLink',
+ type: 'text',
+ required: true,
+ defaultValue: '#',
+ },
{
name: 'secondaryButtonText',
type: 'text',
required: true,
defaultValue: 'Lihat Silabus',
},
+ {
+ name: 'secondaryButtonLink',
+ type: 'text',
+ required: true,
+ defaultValue: '#',
+ },
],
},
],
diff --git a/apps/landing/src/payload-types.ts b/apps/landing/src/payload-types.ts
index e172913..c96a803 100644
--- a/apps/landing/src/payload-types.ts
+++ b/apps/landing/src/payload-types.ts
@@ -370,7 +370,9 @@ export interface LearningResourcesSection {
title: string;
description: string;
primaryButtonText: string;
+ primaryButtonLink: string;
secondaryButtonText: string;
+ secondaryButtonLink: string;
};
updatedAt?: string | null;
createdAt?: string | null;
@@ -473,7 +475,9 @@ export interface LearningResourcesSectionSelect {
title?: T;
description?: T;
primaryButtonText?: T;
+ primaryButtonLink?: T;
secondaryButtonText?: T;
+ secondaryButtonLink?: T;
};
updatedAt?: T;
createdAt?: T;