diff --git a/components/Project/ProjectHeading.vue b/components/Project/ProjectHeading.vue index 1098ea8..fd2b358 100644 --- a/components/Project/ProjectHeading.vue +++ b/components/Project/ProjectHeading.vue @@ -1,5 +1,5 @@ {{ project.links?.github ? 'YES' : 'NO' }} - + @@ -79,7 +144,10 @@ const logo = props.project?.logos?.at(0)?.url
- + {{ project.blockchain_features?.network }} diff --git a/composables/useData.ts b/composables/useData.ts index 5a2442d..853fcd7 100644 --- a/composables/useData.ts +++ b/composables/useData.ts @@ -45,10 +45,12 @@ export const useData = defineStore('data', () => { const projectToShallow = (project: Project): ProjectShallow => { const availableSupport = () => { const filteredKeys = ['forum', 'discord', 'twitter', 'lens', 'farcaster', 'telegram'] - if (typeof project.links === 'object' && (project.links !== null || project.links !== undefined)) - return Object.keys(project.links).filter(key => filteredKeys.includes(key)).length + // if (typeof project.links === 'object' && (project.links !== null || project.links !== undefined)) + if (project.links === null || project.links === undefined) + return 0 - return 0 + if (typeof project.links === 'object' && Object.keys(project.links).length > 0) + return Object.keys(project.links).filter(key => filteredKeys.includes(key)).length } return { @@ -96,8 +98,8 @@ export const useData = defineStore('data', () => { .filter((project) => { return ( project - && project.title1 - && project.title1.toLowerCase().includes(query) + && project.title1 + && project.title1.toLowerCase().includes(query) ) }).filter((project) => { if (filter.sortby === 'anonymity') diff --git a/types/project.ts b/types/project.ts index 78b059e..d5915e4 100644 --- a/types/project.ts +++ b/types/project.ts @@ -143,3 +143,7 @@ export interface ProjectShallow { support?: number | undefined anonymity?: boolean | undefined } + +export interface ProjectIndexable extends Project { + [key: string]: any +}