Skip to content

Commit 51099b3

Browse files
authored
Merge pull request #28 from kleros/refactor/pnk-token-types
refactor(cms): pnk-token-page-types
2 parents b6b40b4 + a8b1b5c commit 51099b3

File tree

11 files changed

+119
-71
lines changed

11 files changed

+119
-71
lines changed

cms-backend/src/api/exchange/content-types/exchange/schema.json

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,30 @@
44
"info": {
55
"singularName": "exchange",
66
"pluralName": "exchanges",
7-
"displayName": "Exchange"
7+
"displayName": "Exchange",
8+
"description": ""
89
},
910
"options": {
1011
"draftAndPublish": true
1112
},
1213
"pluginOptions": {},
1314
"attributes": {
14-
"url": {
15-
"type": "string"
16-
},
1715
"icon": {
16+
"type": "media",
17+
"multiple": false,
18+
"required": false,
1819
"allowedTypes": [
1920
"images",
2021
"files",
2122
"videos",
2223
"audios"
23-
],
24-
"type": "media",
25-
"multiple": false
24+
]
25+
},
26+
"name": {
27+
"type": "string"
28+
},
29+
"url": {
30+
"type": "string"
2631
}
2732
}
2833
}

cms-backend/src/api/pnk-token-page-buy-section/content-types/pnk-token-page-buy-section/schema.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
"header": {
1616
"type": "string"
1717
},
18-
"buyCards": {
19-
"type": "component",
20-
"repeatable": true,
21-
"component": "pnk-token-page.buy-card"
22-
},
2318
"exchanges": {
2419
"type": "relation",
2520
"relation": "oneToMany",
2621
"target": "api::exchange.exchange"
22+
},
23+
"featuredExchanges": {
24+
"type": "relation",
25+
"relation": "oneToMany",
26+
"target": "api::exchange.exchange"
2727
}
2828
}
2929
}

cms-backend/src/api/pnk-token-page-hero/content-types/pnk-token-page-hero/schema.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,16 @@
2323
"repeatable": false,
2424
"component": "content.button-link"
2525
},
26-
"socials": {
27-
"type": "relation",
28-
"relation": "oneToMany",
29-
"target": "api::social.social"
30-
},
3126
"background": {
27+
"type": "media",
28+
"multiple": false,
29+
"required": false,
3230
"allowedTypes": [
3331
"images",
3432
"files",
3533
"videos",
3634
"audios"
37-
],
38-
"type": "media",
39-
"multiple": false
35+
]
4036
}
4137
}
4238
}

cms-backend/src/api/pnk-token-page-need-section/content-types/pnk-token-page-need-section/schema.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"info": {
55
"singularName": "pnk-token-page-need-section",
66
"pluralName": "pnk-token-page-need-sections",
7-
"displayName": "PNKTokenPageNeedSection"
7+
"displayName": "PNKTokenPageNeedSection",
8+
"description": ""
89
},
910
"options": {
1011
"draftAndPublish": true
@@ -24,7 +25,7 @@
2425
},
2526
"arrowLink": {
2627
"type": "component",
27-
"repeatable": true,
28+
"repeatable": false,
2829
"component": "content.button-link"
2930
}
3031
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"kind": "collectionType",
3+
"collectionName": "token_explorers",
4+
"info": {
5+
"singularName": "token-explorer",
6+
"pluralName": "token-explorers",
7+
"displayName": "TokenExplorer",
8+
"description": ""
9+
},
10+
"options": {
11+
"draftAndPublish": true
12+
},
13+
"pluginOptions": {},
14+
"attributes": {
15+
"icon": {
16+
"type": "media",
17+
"multiple": false,
18+
"required": false,
19+
"allowedTypes": [
20+
"images",
21+
"files",
22+
"videos",
23+
"audios"
24+
]
25+
},
26+
"name": {
27+
"type": "string"
28+
},
29+
"url": {
30+
"type": "string"
31+
}
32+
}
33+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* token-explorer controller
3+
*/
4+
5+
import { factories } from '@strapi/strapi'
6+
7+
export default factories.createCoreController('api::token-explorer.token-explorer');
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* token-explorer router
3+
*/
4+
5+
import { factories } from '@strapi/strapi';
6+
7+
export default factories.createCoreRouter('api::token-explorer.token-explorer');
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* token-explorer service
3+
*/
4+
5+
import { factories } from '@strapi/strapi';
6+
7+
export default factories.createCoreService('api::token-explorer.token-explorer');

cms-backend/src/components/pnk-token-page/buy-card.json

Lines changed: 0 additions & 28 deletions
This file was deleted.

cms-backend/types/generated/components.d.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,6 @@ export interface PnkTokenPageTokenStatDisplay extends Struct.ComponentSchema {
1111
};
1212
}
1313

14-
export interface PnkTokenPageBuyCard extends Struct.ComponentSchema {
15-
collectionName: 'components_pnk_token_page_buy_cards';
16-
info: {
17-
displayName: 'buy-card';
18-
description: '';
19-
};
20-
attributes: {
21-
title: Schema.Attribute.String;
22-
icon: Schema.Attribute.Media<
23-
'images' | 'files' | 'videos' | 'audios',
24-
true
25-
>;
26-
link: Schema.Attribute.Relation<'oneToOne', 'api::link.link'>;
27-
};
28-
}
29-
3014
export interface ForBuildersPageSolutionSection extends Struct.ComponentSchema {
3115
collectionName: 'solution_sections';
3216
info: {
@@ -165,7 +149,6 @@ declare module '@strapi/strapi' {
165149
export module Public {
166150
export interface ComponentSchemas {
167151
'pnk-token-page.token-stat-display': PnkTokenPageTokenStatDisplay;
168-
'pnk-token-page.buy-card': PnkTokenPageBuyCard;
169152
'for-builders-page.solution-section': ForBuildersPageSolutionSection;
170153
'for-builders-page.key-challenge': ForBuildersPageKeyChallenge;
171154
'for-builders-page.get-in-touch-section': ForBuildersPageGetInTouchSection;

0 commit comments

Comments
 (0)