Add a type for the Keycard blog
This commit is contained in:
parent
77d104d51b
commit
5f1ce8ad3a
|
@ -68,6 +68,15 @@ interface SubspaceBlog {
|
|||
url: string;
|
||||
}
|
||||
|
||||
interface KeycardBlog {
|
||||
title: string;
|
||||
published_at: string;
|
||||
primary_author: any;
|
||||
excerpt: string;
|
||||
feature_image: string;
|
||||
url: string;
|
||||
}
|
||||
|
||||
export const FetchEmbark = async () => {
|
||||
await fetch(`${embarkBlog}`)
|
||||
.then(response => response.text())
|
||||
|
@ -165,7 +174,7 @@ export const FetchKeycard = async () => {
|
|||
.then(response => response.json())
|
||||
.then(data => {
|
||||
keycardData = data.posts
|
||||
keycardData.forEach((entry: keycardBlog) => {
|
||||
keycardData.forEach((entry: KeycardBlog) => {
|
||||
const postData: any = {}
|
||||
postData.title = entry.title;
|
||||
postData.published_at = entry.published_at;
|
||||
|
|
Loading…
Reference in New Issue