diff --git a/data/ecosystemData.ts b/data/ecosystemData.ts index d9e978e..f6dd934 100644 --- a/data/ecosystemData.ts +++ b/data/ecosystemData.ts @@ -1,54 +1,54 @@ export type EcosystemAppLogoType = { - fileId: string; - url: string; - alt: string | null; + fileId: string; + url: string; + alt: string | null; }; export type EcosystemFieldData = { - "featured-app": boolean; - profile: string; - link: string; - "sei-only": boolean; - name: string; - slug: string; - logo: EcosystemAppLogoType; - categorie: string; + 'featured-app': boolean; + profile: string; + link: string; + 'sei-only': boolean; + name: string; + slug: string; + logo: EcosystemAppLogoType; + categorie: string; }; export type EcosystemItem = { - id: string; - cmsLocaleId: string; - lastPublished: string; - lastUpdated: string; - createdOn: string; - isArchived: boolean; - isDraft: boolean; - fieldData: EcosystemFieldData; + id: string; + cmsLocaleId: string; + lastPublished: string; + lastUpdated: string; + createdOn: string; + isArchived: boolean; + isDraft: boolean; + fieldData: EcosystemFieldData; }; export type EcosystemResponse = { - data: EcosystemItem[]; + data: EcosystemItem[]; }; export async function getSeiEcosystemAppsData(): Promise { - const url = "http://staging.app-api.seinetwork.io/webflow/ecosystem"; // TODO: Move to ENV - const headers = { Accept: 'application/json' }; + const url = 'http://app-api.seinetwork.io/webflow/ecosystem'; // TODO: Move to ENV + const headers = { Accept: 'application/json' }; - try { - const response = await fetch(url, { - method: "GET", - headers, - }); + try { + const response = await fetch(url, { + method: 'GET', + headers + }); - if (!response.ok) { - throw new Error(`HTTP error! Status: ${response.status}`); - } + if (!response.ok) { + throw new Error(`HTTP error! Status: ${response.status}`); + } - const data = await response.json(); - console.log("Sei Ecosystem data", data); - return data; - } catch (error) { - console.error("Failed to fetch data:", error); - return { data: [] }; - } -} \ No newline at end of file + const data = await response.json(); + console.log('Sei Ecosystem data', data); + return data; + } catch (error) { + console.error('Failed to fetch data:', error); + return { data: [] }; + } +}