Skip to content

Commit a3ef0fa

Browse files
committed
default content in case something goes wrong
1 parent 49b191b commit a3ef0fa

3 files changed

Lines changed: 103 additions & 0 deletions

File tree

assets/stencil/components/additional-resources/additional-resources.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Prismic from 'prismic-javascript';
22
import { Component, Prop, h, Host, State } from '@stencil/core';
3+
import defaultResources from './default.json';
34

45
@Component({
56
tag: 'additional-resources',
@@ -40,6 +41,9 @@ export class AdditionalResources {
4041
// console.log(this.headline, this.resources)
4142
} catch (e) {
4243
console.warn(e);
44+
console.log('Using default Related Resources instead');
45+
this.headline = 'Related Reading';
46+
this.resources = defaultResources;
4347
}
4448
}
4549

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
[
2+
{
3+
"id": "XFtVWhQAAB8AaRsr",
4+
"type": "article",
5+
"tags": [
6+
"hybrid",
7+
"introduction"
8+
],
9+
"slug": "what-is-hybrid-app-development",
10+
"lang": "en-us",
11+
"uid": "what-is-hybrid-app-development",
12+
"data": {
13+
"title": "What is Hybrid App Development?",
14+
"tagline": "Hybrid apps are a blend, hence the name hybrid, of both native and web solutions. Where the core of the application is written using web technologies. In this article we dive deep into hybrid app technology.",
15+
"hero_image": {
16+
"dimensions": {
17+
"width": 1440,
18+
"height": 720
19+
},
20+
"alt": null,
21+
"copyright": null,
22+
"url": "https://images.prismic.io/ionicframeworkcom/2467bff206b39cd3bfa7fd8b8b0b91988d70485f_hybrid-app-development.png?auto=compress,format",
23+
"1x": {
24+
"dimensions": {
25+
"width": 720,
26+
"height": 360
27+
},
28+
"alt": null,
29+
"copyright": null,
30+
"url": "https://images.prismic.io/ionicframeworkcom/879463f76f322c72c9944264eaefa0e772d415a2_hybrid-app-development.png?auto=compress,format"
31+
}
32+
}
33+
},
34+
"link_type": "Document",
35+
"isBroken": false
36+
},
37+
{
38+
"id": "XtbAQxAAACMARbZ9",
39+
"type": "video",
40+
"tags": [
41+
"react",
42+
"capacitor"
43+
],
44+
"slug": "learn-to-build-mobile-apps-with-ionic-framework-reactjs-and-capacitor",
45+
"lang": "en-us",
46+
"uid": "build-mobile-apps-with-ionic-framework-reactjs-and-capacitor",
47+
"data": {
48+
"title": "Learn to Build Mobile Apps With Ionic Framework, ReactJS and Capacitor",
49+
"tagline": "We start with the famous two tab application, walking through the structure of the application and how to set up the routes for the tabs."
50+
},
51+
"link_type": "Document",
52+
"isBroken": false
53+
},
54+
{
55+
"id": "XmEq-hEAACIAfdkR",
56+
"type": "article",
57+
"tags": [
58+
"community",
59+
"ionic"
60+
],
61+
"slug": "why-developers-love-ionic",
62+
"lang": "en-us",
63+
"uid": "why-developers-love-ionic",
64+
"data": {
65+
"title": "Why Developers Love Ionic",
66+
"tagline": "Ionic powers a significant portion of the Apple App Store and Google Play Store, driven entirely by the love that developers have for building apps with our platform.",
67+
"hero_image": {
68+
"dimensions": {
69+
"width": 1440,
70+
"height": 800
71+
},
72+
"alt": null,
73+
"copyright": null,
74+
"url": "https://images.prismic.io/ionicframeworkcom/79ff69bb-774b-48d8-b30a-b9ac533121e1_why-devs-love-ionic-article.png?auto=compress,format&rect=0,0,1440,800&w=1440&h=800",
75+
"1x": {
76+
"dimensions": {
77+
"width": 720,
78+
"height": 400
79+
},
80+
"alt": null,
81+
"copyright": null,
82+
"url": "https://images.prismic.io/ionicframeworkcom/79ff69bb-774b-48d8-b30a-b9ac533121e1_why-devs-love-ionic-article.png?auto=compress,format&rect=0,0,1440,800&w=720&h=400"
83+
}
84+
},
85+
"meta_image": {
86+
"dimensions": {
87+
"width": 1200,
88+
"height": 630
89+
},
90+
"alt": null,
91+
"copyright": null,
92+
"url": "https://images.prismic.io/ionicframeworkcom/79ff69bb-774b-48d8-b30a-b9ac533121e1_why-devs-love-ionic-article.png?auto=compress,format&rect=0,22,1440,756&w=1200&h=630"
93+
}
94+
},
95+
"link_type": "Document",
96+
"isBroken": false
97+
}
98+
]

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"noUnusedParameters": true,
1616
"jsx": "react",
1717
"jsxFactory": "h",
18+
"resolveJsonModule": true,
1819
},
1920
"include": [
2021
"assets/stencil",

0 commit comments

Comments
 (0)