mirror of
https://github.com/StepanovPlaton/AboutMe.git
synced 2026-04-04 04:40:51 +04:00
Fixes
This commit is contained in:
@@ -50,10 +50,18 @@ export const getProjectStats = () => {
|
||||
|
||||
// Get projects by category
|
||||
export const getProjectsByCategory = (category?: string) => {
|
||||
let filteredProjects: Project[];
|
||||
if (!category || category === "all") {
|
||||
return projectsData;
|
||||
filteredProjects = projectsData;
|
||||
} else {
|
||||
filteredProjects = projectsData.filter((p) => p.category === category);
|
||||
}
|
||||
return projectsData.filter((p) => p.category === category);
|
||||
// Sort by startDate in descending order (newest first)
|
||||
return filteredProjects.sort((a, b) => {
|
||||
const dateA = new Date(a.startDate).getTime();
|
||||
const dateB = new Date(b.startDate).getTime();
|
||||
return dateB - dateA;
|
||||
});
|
||||
};
|
||||
|
||||
// Get featured projects
|
||||
|
||||
@@ -22,6 +22,7 @@ export interface TimelineItem {
|
||||
icon?: string; // Iconify icon name
|
||||
color?: string;
|
||||
featured?: boolean;
|
||||
not_pin?: boolean; // If true, exclude from "Current Status" section
|
||||
}
|
||||
|
||||
export const timelineData: TimelineItem[] = Object.entries(timelineModules).map(([path, mod]: [string, any]) => {
|
||||
@@ -74,7 +75,7 @@ export const getFeaturedTimeline = () => {
|
||||
|
||||
// Get current ongoing items
|
||||
export const getCurrentItems = () => {
|
||||
return timelineData.filter((item) => !item.endDate);
|
||||
return timelineData.filter((item) => !item.endDate && !item.not_pin);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user