[yoga-11] add common type and add logo
This commit is contained in:
parent
958007ed2f
commit
551f545935
@ -31,7 +31,7 @@ export default async function ServiceArticlePage({params}: {
|
|||||||
if (!servicePage) {
|
if (!servicePage) {
|
||||||
return notFound()
|
return notFound()
|
||||||
}
|
}
|
||||||
const {subscribeNow, footer} = servicePage;
|
const {subscribeNow, footer, common} = servicePage;
|
||||||
const servicesByName = await strapiApi.getService(slug);
|
const servicesByName = await strapiApi.getService(slug);
|
||||||
if (!servicesByName || servicesByName.length === 0) {
|
if (!servicesByName || servicesByName.length === 0) {
|
||||||
return notFound();
|
return notFound();
|
||||||
|
|||||||
@ -8,19 +8,23 @@ export interface YogaCommon {
|
|||||||
id: number;
|
id: number;
|
||||||
attributes: {
|
attributes: {
|
||||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: { data: Media };
|
createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: { data: Media };
|
||||||
|
name: string;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
export interface YogaCommon_Plain {
|
export interface YogaCommon_Plain {
|
||||||
id: number;
|
id: number;
|
||||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: Media_Plain;
|
createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: Media_Plain;
|
||||||
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface YogaCommon_NoRelations {
|
export interface YogaCommon_NoRelations {
|
||||||
id: number;
|
id: number;
|
||||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: number;
|
createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: number;
|
||||||
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface YogaCommon_AdminPanelLifeCycle {
|
export interface YogaCommon_AdminPanelLifeCycle {
|
||||||
id: number;
|
id: number;
|
||||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: AdminPanelRelationPropertyModification<Media_Plain>;
|
createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: AdminPanelRelationPropertyModification<Media_Plain>;
|
||||||
|
name: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,21 +4,27 @@
|
|||||||
"info": {
|
"info": {
|
||||||
"singularName": "yoga-common",
|
"singularName": "yoga-common",
|
||||||
"pluralName": "yoga-commons",
|
"pluralName": "yoga-commons",
|
||||||
"displayName": "YogaCommon"
|
"displayName": "YogaCommon",
|
||||||
|
"description": ""
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"draftAndPublish": true
|
"draftAndPublish": true
|
||||||
},
|
},
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"logoImage": {
|
"logoImage": {
|
||||||
|
"type": "media",
|
||||||
|
"multiple": false,
|
||||||
|
"required": false,
|
||||||
"allowedTypes": [
|
"allowedTypes": [
|
||||||
"images",
|
"images",
|
||||||
"files",
|
"files",
|
||||||
"videos",
|
"videos",
|
||||||
"audios"
|
"audios"
|
||||||
],
|
]
|
||||||
"type": "media",
|
},
|
||||||
"multiple": false
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"required": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
yoga-cms/types/generated/contentTypes.d.ts
vendored
2
yoga-cms/types/generated/contentTypes.d.ts
vendored
@ -1237,6 +1237,7 @@ export interface ApiYogaBlogPostsComponentYogaBlogPostsComponent
|
|||||||
export interface ApiYogaCommonYogaCommon extends Struct.CollectionTypeSchema {
|
export interface ApiYogaCommonYogaCommon extends Struct.CollectionTypeSchema {
|
||||||
collectionName: 'yoga_commons';
|
collectionName: 'yoga_commons';
|
||||||
info: {
|
info: {
|
||||||
|
description: '';
|
||||||
displayName: 'YogaCommon';
|
displayName: 'YogaCommon';
|
||||||
pluralName: 'yoga-commons';
|
pluralName: 'yoga-commons';
|
||||||
singularName: 'yoga-common';
|
singularName: 'yoga-common';
|
||||||
@ -1255,6 +1256,7 @@ export interface ApiYogaCommonYogaCommon extends Struct.CollectionTypeSchema {
|
|||||||
> &
|
> &
|
||||||
Schema.Attribute.Private;
|
Schema.Attribute.Private;
|
||||||
logoImage: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'>;
|
logoImage: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'>;
|
||||||
|
name: Schema.Attribute.String & Schema.Attribute.Required;
|
||||||
publishedAt: Schema.Attribute.DateTime;
|
publishedAt: Schema.Attribute.DateTime;
|
||||||
updatedAt: Schema.Attribute.DateTime;
|
updatedAt: Schema.Attribute.DateTime;
|
||||||
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user