add people
This commit is contained in:
31
src/lib/peopleData.ts
Normal file
31
src/lib/peopleData.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
// This file dynamically imports all people data from components
|
||||
// When new people components are added, they will automatically appear
|
||||
|
||||
export interface PersonData {
|
||||
name: string
|
||||
role: string
|
||||
imageUrl: string
|
||||
xUrl: string
|
||||
linkedinUrl: string
|
||||
}
|
||||
|
||||
// Import all existing people data
|
||||
import { data as adnanData } from '@/components/people/People_Adnan'
|
||||
|
||||
// Function to get all people data
|
||||
export function getAllPeopleData(): PersonData[] {
|
||||
const allPeopleData: PersonData[] = []
|
||||
|
||||
// Add data from all existing people components
|
||||
try {
|
||||
allPeopleData.push(...adnanData)
|
||||
} catch (error) {
|
||||
console.error('Error loading Adnan data:', error)
|
||||
}
|
||||
|
||||
// When new people components are created, add their imports here:
|
||||
// import { data as newPersonData } from '@/components/people/People_NewPerson'
|
||||
// allPeopleData.push(...newPersonData)
|
||||
|
||||
return allPeopleData
|
||||
}
|
Reference in New Issue
Block a user