Skip to content

Commit 3023eca

Browse files
committed
Fix (Routing Issues)
1 parent 6a44af9 commit 3023eca

File tree

10 files changed

+46
-44
lines changed

10 files changed

+46
-44
lines changed

src/App.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { preloadCriticalAssets } from './components/utils/assetPreloader';
1010
import { applyPerformanceOptimizations } from './components/utils/animationOptimizer';
1111
import { resolvePath } from './components/utils/paths';
1212

13-
1413
// Components
1514
import Header from './components/Header';
1615
import Footer from './components/Footer';

src/components/Header.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,4 @@ style.textContent = `
139139
`;
140140
document.head.appendChild(style);
141141

142-
export default Header;
142+
export default Header;

src/components/about/BiographySection.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ const BiographySection = ({ bio, image }) => {
145145
}}
146146
>
147147
<Image
148-
src={image || '/hxndev.github.io/images/profile.jpg'}
148+
src={image || '/images/profile.jpg'}
149149
alt="Hassan Shahzad"
150150
radius="md"
151151
height={300}

src/components/about/Timeline.jsx

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -100,22 +100,18 @@ const TimelineItem = ({ title, company, date, description, bullets = [], isActiv
100100
<Text className="timeline-content" weight={500} size="md" mb="sm">
101101
{company}
102102
</Text>
103-
103+
104104
{/* Description - can be string or JSX */}
105-
<Box className="timeline-content" mb={bullets && bullets.length > 0 ? "sm" : "md"}>
106-
{typeof description === 'string' ? (
107-
<Text>{description}</Text>
108-
) : (
109-
description
110-
)}
105+
<Box className="timeline-content" mb={bullets && bullets.length > 0 ? 'sm' : 'md'}>
106+
{typeof description === 'string' ? <Text>{description}</Text> : description}
111107
</Box>
112-
108+
113109
{/* Bullets list - if provided */}
114110
{bullets && bullets.length > 0 && (
115111
<Box className="timeline-content" mb="md">
116-
<ul style={{ paddingLeft: "20px", margin: "0" }}>
112+
<ul style={{ paddingLeft: '20px', margin: '0' }}>
117113
{bullets.map((bullet, index) => (
118-
<li key={index} style={{ marginBottom: "8px" }}>
114+
<li key={index} style={{ marginBottom: '8px' }}>
119115
<Text component="span">{bullet}</Text>
120116
</li>
121117
))}
@@ -225,4 +221,4 @@ const Timeline = ({ experiences = [] }) => {
225221
);
226222
};
227223

228-
export default Timeline;
224+
export default Timeline;

src/components/home/HeroSection.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { gsap } from 'gsap';
55
import { useColorScheme } from '../../theme/ThemeProvider';
66
import { resolveAssetPath } from '../utils/paths';
77

8-
98
const HeroSection = () => {
109
const containerRef = useRef(null);
1110
const textRef = useRef(null);

src/components/utils/assetPreloader.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,7 @@ export const getCriticalImages = () => {
112112
];
113113

114114
// Resolve all paths
115-
return imagePaths.map(path =>
116-
path.startsWith('http') ? path : resolveAssetPath(path)
117-
);
115+
return imagePaths.map(path => (path.startsWith('http') ? path : resolveAssetPath(path)));
118116
};
119117

120118
/**
@@ -134,4 +132,4 @@ export default {
134132
preloadFont,
135133
getCriticalImages,
136134
preloadCriticalAssets,
137-
};
135+
};

src/components/utils/imageUtils.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Utility functions for handling image paths in portfolio
33
*/
4-
import { getBasePath as getBasePathUtil, resolveAssetPath } from '../../utils/paths';
4+
import { getBasePath as getBasePathUtil } from '../../utils/paths';
55

66
/**
77
* Gets the correct image path based on environment and image path format
@@ -119,4 +119,4 @@ export default {
119119
getImagePath,
120120
findWorkingImagePath,
121121
getBasePath,
122-
};
122+
};

src/components/utils/paths.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Detect if we're in production or development
2-
const isProd = import.meta.env.PROD;
2+
const _isProd = import.meta.env.PROD;
33

44
// Base path should be empty for username.github.io repos
55
export const BASE_PATH = '';
@@ -12,10 +12,10 @@ export function resolvePath(path) {
1212
if (path.startsWith('http')) {
1313
return path;
1414
}
15-
15+
1616
// Ensure path starts with slash
1717
const normalizedPath = path.startsWith('/') ? path : `/${path}`;
18-
18+
1919
// In production (GitHub Pages), use the base path
2020
// In development, use paths as is
2121
return `${BASE_PATH}${normalizedPath}`;
@@ -29,10 +29,10 @@ export function resolveAssetPath(path) {
2929
if (path.startsWith('http')) {
3030
return path;
3131
}
32-
32+
3333
// Remove leading slash if present
3434
const normalizedPath = path.startsWith('/') ? path.substring(1) : path;
35-
35+
3636
// In production, assets are at the root
3737
return `${BASE_PATH}/${normalizedPath}`;
38-
}
38+
}

src/pages/About.jsx

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,44 +51,54 @@ const About = () => {
5151
date: 'Mar 2024 - Feb 2025',
5252
description: (
5353
<>
54-
Designed and deployed scalable data infrastructure for <a href="https://gbdi.org" target="_blank" rel="noopener noreferrer" style={{ color: '#9B00FF', textDecoration: 'underline' }}>GBDI</a> (Global Building Data Initiative), improving data processing speed by 30% through optimized AWS pipelines.
54+
Designed and deployed scalable data infrastructure for{' '}
55+
<a
56+
href="https://gbdi.org"
57+
target="_blank"
58+
rel="noopener noreferrer"
59+
style={{ color: '#9B00FF', textDecoration: 'underline' }}
60+
>
61+
GBDI
62+
</a>{' '}
63+
(Global Building Data Initiative), improving data processing speed by 30% through
64+
optimized AWS pipelines.
5565
</>
5666
),
5767
// Add a separate bullets array for list items
5868
bullets: [
5969
"Engineered ReactJS web applications and APIs to resolve 3 critical user pain points (e.g., fragmented data access, slow query response) for GBDI's global building materials database.",
60-
"Built scalable architectures for cross-functional research projects, enhancing system efficiency by 20%."
61-
]
70+
'Built scalable architectures for cross-functional research projects, enhancing system efficiency by 20%.',
71+
],
6272
},
6373
{
6474
title: 'Lead Full Stack Developer',
6575
company: 'IBM',
6676
date: 'Jul 2022 - Nov 2023',
6777
description: '', // Empty description since we're only using bullet points
6878
bullets: [
69-
"Led the development of microservices architecture, reducing deployment time by 75%.",
70-
"Designed and executed CI/CD pipelines for containerized applications on AWS, resulting in a significant increase in delivery speed."
71-
]
79+
'Led the development of microservices architecture, reducing deployment time by 75%.',
80+
'Designed and executed CI/CD pipelines for containerized applications on AWS, resulting in a significant increase in delivery speed.',
81+
],
7282
},
7383
{
7484
title: 'Full Stack Developer',
7585
company: 'Shanghai Zixel',
7686
date: 'Apr 2022 - Jul 2022',
7787
description: '', // Empty description since we're only using bullet points
7888
bullets: [
79-
"Developed microservices-based applications, reducing response time by 40%.",
80-
"Transformed server-side architecture with cutting-edge technologies including Spring Boot and MySQL."
81-
]
89+
'Developed microservices-based applications, reducing response time by 40%.',
90+
'Transformed server-side architecture with cutting-edge technologies including Spring Boot and MySQL.',
91+
],
8292
},
8393
{
8494
title: 'Full Stack Developer',
8595
company: 'Think Vision',
8696
date: 'Sep 2020 - Mar 2022',
8797
description: '', // Empty description since we're only using bullet points
8898
bullets: [
89-
"Designed and developed a ReactJS website integrated with a mobile app, achieving real-time notifications via a linked database.",
90-
"Built and deployed a microservice on Kubernetes, improving monitoring and updates by 20%."
91-
]
99+
'Designed and developed a ReactJS website integrated with a mobile app, achieving real-time notifications via a linked database.',
100+
'Built and deployed a microservice on Kubernetes, improving monitoring and updates by 20%.',
101+
],
92102
},
93103
];
94104

@@ -128,9 +138,9 @@ const About = () => {
128138

129139
// Bio paragraphs
130140
const bio = [
131-
"I am a results-driven Full Stack Developer with 5 years of experience in designing and deploying scalable applications, optimizing system performance, and leading teams. My expertise spans frontend and backend development, cloud infrastructure, and DevOps, enabling me to build high-impact solutions for both Fortune 50 companies and cutting-edge research projects.",
132-
"With a strong foundation in Python, Java, JavaScript, and Rust, I specialize in creating performant, secure, and maintainable applications. My work has included optimizing AWS-based pipelines to enhance data processing speeds, developing ReactJS applications that improve user experience, and architecting microservices to streamline deployment and scalability.",
133-
"Passionate about tackling complex engineering challenges, I excel in end-to-end development, from system design to deployment and maintenance. My approach emphasizes both functionality and user experience, ensuring that the solutions I build drive efficiency and real-world impact.",
141+
'I am a results-driven Full Stack Developer with 5 years of experience in designing and deploying scalable applications, optimizing system performance, and leading teams. My expertise spans frontend and backend development, cloud infrastructure, and DevOps, enabling me to build high-impact solutions for both Fortune 50 companies and cutting-edge research projects.',
142+
'With a strong foundation in Python, Java, JavaScript, and Rust, I specialize in creating performant, secure, and maintainable applications. My work has included optimizing AWS-based pipelines to enhance data processing speeds, developing ReactJS applications that improve user experience, and architecting microservices to streamline deployment and scalability.',
143+
'Passionate about tackling complex engineering challenges, I excel in end-to-end development, from system design to deployment and maintenance. My approach emphasizes both functionality and user experience, ensuring that the solutions I build drive efficiency and real-world impact.',
134144
];
135145

136146
return (

src/pages/Projects.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const Projects = () => {
5656
(projectId, action = 'page') => {
5757
if (action === 'reset') {
5858
resetFilters();
59-
navigate('/hxndev.github.io/projects');
59+
navigate('/projects');
6060
return;
6161
}
6262

@@ -68,7 +68,7 @@ const Projects = () => {
6868
openProjectModal(projectId, projectsData);
6969
} else if (action === 'page') {
7070
// Update the URL
71-
navigate(`/hxndev.github.io/projects?project=${projectId}`);
71+
navigate(`/projects?project=${projectId}`);
7272
// View project details
7373
viewProjectDetails(projectId, projectsData);
7474
}

0 commit comments

Comments
 (0)