Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 52 additions & 30 deletions pages/team.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const ProfileSkeleton = () => {
const Teams = () => {
const [fetched, setFetched] = useState(false);
const [convenor, setConvenor] = useState(null);
const [president, setPresident] = useState(null);
const [vp, setVp] = useState(null);
const [president, setPresident] = useState([]);
const [vp, setVp] = useState([]);

// const [admins, setAdmins] = useState([]);
const [directors, setDirectors] = useState([]);
Expand All @@ -43,11 +43,11 @@ const Teams = () => {
const convenorData = teamData.find(
(item) => item.position === "Convenor"
);
const presidentData = teamData.find(
const presidentData = teamData.filter(
(item) => item.position === "President"
);
const vpData = teamData.find(
(item) => item.position === "vicePresident"
const vpData = teamData.filter(
(item) => item.position === "Vice President"
);

console.log("Convenor:", convenorData);
Expand Down Expand Up @@ -107,8 +107,8 @@ const Teams = () => {
const generateKeywords = () => {
const keywordsArray = [
convenor?.name || "",
president?.name || "",
vp?.name || "",
president.length > 0 ? president.map(p => p.name).join(", ") : "",
vp.length > 0 ? vp.map(v => v.name).join(", ") : "",
directors.length > 0 ? directors.map(director => director.name).join(", ") : "",
leads.length > 0 ? leads.map(lead => lead.name).join(", ") : "",
associates.length > 0 ? associates.map(associate => associate.name).join(", ") : "",
Expand Down Expand Up @@ -173,16 +173,22 @@ const Teams = () => {
"employee": [
{
"@type": "Person",
"name": president?.name,
"jobTitle": "President",
"image": president?.pictureUrl,
"name": convenor?.name,
"jobTitle": "Convenor",
"image": convenor?.pictureUrl,
},
{
...president.map(p => ({
"@type": "Person",
"name": p.name,
"jobTitle": "President",
"image": p.pictureUrl,
})),
...vp.map(v => ({
"@type": "Person",
"name": vp?.name,
"name": v.name,
"jobTitle": "Vice President",
"image": vp?.pictureUrl,
},
"image": v.pictureUrl,
})),
...leads.map(lead => ({
"@type": "Person",
"name": lead.name,
Expand Down Expand Up @@ -233,14 +239,22 @@ const Teams = () => {
President
</h2>
{!fetched ? (
<ProfileSkeleton />
) : president ? (
<ProfileCard
photo={president.pictureUrl}
name={president.name}
caption={president.caption}
socials={president.socials}
/>
<div className="flex gap-8">
<ProfileSkeleton />
<ProfileSkeleton />
</div>
) : president.length > 0 ? (
<div className="flex flex-wrap justify-center gap-8">
{president.map((pres, index) => (
<ProfileCard
key={index}
photo={pres.pictureUrl}
name={pres.name}
caption={pres.caption}
socials={pres.socials}
/>
))}
</div>
) : (
<p className="text-center text-gray-400">No president data available</p>
)}
Expand All @@ -251,14 +265,22 @@ const Teams = () => {
Vice President
</h2>
{!fetched ? (
<ProfileSkeleton />
) : vp ? (
<ProfileCard
photo={vp.pictureUrl}
name={vp.name}
caption={vp.caption}
socials={vp.socials}
/>
<div className="flex gap-8">
<ProfileSkeleton />
<ProfileSkeleton />
</div>
) : vp.length > 0 ? (
<div className="flex flex-wrap justify-center gap-8">
{vp.map((vice, index) => (
<ProfileCard
key={index}
photo={vice.pictureUrl}
name={vice.name}
caption={vice.caption}
socials={vice.socials}
/>
))}
</div>
) : (
<p className="text-center text-gray-400">No vice president data available</p>
)}
Expand Down
10 changes: 5 additions & 5 deletions public/sitemap-0.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url><loc>https://githubsrmist.tech</loc><lastmod>2025-10-17T15:21:39.369Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://githubsrmist.tech/about</loc><lastmod>2025-10-17T15:21:39.370Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://githubsrmist.tech/contact</loc><lastmod>2025-10-17T15:21:39.370Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://githubsrmist.tech/events</loc><lastmod>2025-10-17T15:21:39.370Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://githubsrmist.tech/team</loc><lastmod>2025-10-17T15:21:39.370Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://githubsrmist.in</loc><lastmod>2025-10-18T07:30:38.900Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://githubsrmist.in/about</loc><lastmod>2025-10-18T07:30:38.901Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://githubsrmist.in/contact</loc><lastmod>2025-10-18T07:30:38.901Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://githubsrmist.in/events</loc><lastmod>2025-10-18T07:30:38.901Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://githubsrmist.in/team</loc><lastmod>2025-10-18T07:30:38.901Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
</urlset>
2 changes: 1 addition & 1 deletion public/sitemap.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap><loc>https://githubsrmist.tech/sitemap-0.xml</loc></sitemap>
<sitemap><loc>https://githubsrmist.in/sitemap-0.xml</loc></sitemap>
</sitemapindex>
Loading