Skip to content

Commit

Permalink
added some unnecessary codes and optimizes (#726)
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammad-fiaz authored Dec 2, 2024
1 parent 5b247f4 commit 7a6c582
Show file tree
Hide file tree
Showing 40 changed files with 227 additions and 198 deletions.
Binary file modified bun.lockb
Binary file not shown.
8 changes: 4 additions & 4 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ const nextConfig: NextConfig = {
protocol: 'https',
hostname: 'avatars.githubusercontent.com',
port: '',
pathname: '/**',
},
],
},
pathname: '/**'
}
]
}
};

export default nextConfig;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"postbuild": "next-sitemap --config sitemap.config.js"
"prebuild": "next-sitemap --config sitemap.config.js"
},
"dependencies": {
"@emotion/react": "^11.13.5",
Expand Down
7 changes: 2 additions & 5 deletions pages/api/fetchRSS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
import Parser from 'rss-parser';
import { siteConfig } from '@/src/configs/config';

export default async function handler(
req: any,
res: any
) {
export default async function handler(req: any, res: any) {
const parser = new Parser();
const feed = await parser.parseURL(`${siteConfig.social.blog}/rss.xml`);

Expand All @@ -16,7 +13,7 @@ export default async function handler(
link: item.link,
contentSnippet: item.contentSnippet,
categories: item.categories || [], // Categories (tags)
source: item.source?.title || 'Hashnode', // Get the source blog title
source: item.source?.title || 'Hashnode' // Get the source blog title
}));

res.status(200).json({ items: blogs });
Expand Down
10 changes: 0 additions & 10 deletions public/sitemap-0.xml

This file was deleted.

4 changes: 0 additions & 4 deletions public/sitemap.xml

This file was deleted.

2 changes: 1 addition & 1 deletion src/app/(user)/about/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export async function generateMetadata() {
return getPageMetadata({
title: 'About Me',
description: `Learn more about ${siteConfig.author}, my mission, vision, and values as a developer.`,
path: '/about',
path: '/about'
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/(user)/blog/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export async function generateMetadata() {
return getPageMetadata({
title: 'Blog',
description: 'Read the latest articles and updates on my portfolio blog.',
path: '/blog',
path: '/blog'
});
}

Expand Down
4 changes: 2 additions & 2 deletions src/app/(user)/home/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

import { redirect } from 'next/navigation';
import { generateMetadata as getPageMetadata } from '@/src/components/utils/generateMetadata';

export async function generateMetadata() {
return getPageMetadata({
title: 'Home',
path: '/',
path: '/'
});
}
export default function HomeRedirectPage() {
Expand Down
2 changes: 1 addition & 1 deletion src/app/(user)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { generateMetadata as getPageMetadata } from '@/src/components/utils/gene
export async function generateMetadata() {
return getPageMetadata({
title: '',
path: '/',
path: '/'
});
}

Expand Down
5 changes: 3 additions & 2 deletions src/app/(user)/projects/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import { generateMetadata as getPageMetadata } from '@/src/components/utils/gene
export async function generateMetadata() {
return getPageMetadata({
title: 'Projects',
description: 'Explore the projects I have worked on, showcasing skills and technologies.',
path: '/projects',
description:
'Explore the projects I have worked on, showcasing skills and technologies.',
path: '/projects'
});
}

Expand Down
7 changes: 1 addition & 6 deletions src/app/head.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import { usePathname } from 'next/navigation';
import { generateMetadata } from '@/src/components/utils/generateMetadata';
import { siteConfig } from '@/src/configs/config';

const Head = () => {
const pathname = usePathname() || '/';
Expand Down Expand Up @@ -32,11 +31,7 @@ const Head = () => {
<meta name="twitter:image" content={meta.twitter.image} />
<link rel="canonical" href={meta.url} />
<link rel="icon" href={meta.link[0].href} />
<script
async
src={siteConfig.googleAdsScript}
crossOrigin='anonymous'
></script>

</>
);
};
Expand Down
5 changes: 3 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import FlareCursor from '@/src/components/ui/FlareCursor';
import ProgressBar from '@/src/components/utils/progress';
import BackToTopButton from '@/src/components/utils/BackToTopButton';
import Head from './head';
import { SpeedInsights } from "@vercel/speed-insights/next";
import { Analytics } from "@vercel/analytics/react";
import { SpeedInsights } from '@vercel/speed-insights/next';
import { Analytics } from '@vercel/analytics/react';

const graphik = local({
src: [
{
Expand Down
8 changes: 6 additions & 2 deletions src/app/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ export default function NotFound() {
return (
<div className="min-h-screen flex flex-col items-center justify-center text-white">
<h1 className="text-6xl font-extrabold text-white mb-6">404</h1>
<p className="text-2xl text-gray-400 mb-4">Oops! The page you're looking for doesn't exist.</p>
<p className="text-2xl text-gray-400 mb-4">
Oops! The page you're looking for doesn't exist.
</p>
<p className="text-lg text-gray-500 mb-8">
The page might have been moved or deleted, or the URL may be incorrect.
</p>
Expand All @@ -23,7 +25,9 @@ export default function NotFound() {
</a>
</div>
<div className="mt-12">
<p className="text-sm text-gray-500">© 2024 {siteConfig.author}. All Rights Reserved.</p>
<p className="text-sm text-gray-500">
© 2024 {siteConfig.author}. All Rights Reserved.
</p>
</div>
</div>
);
Expand Down
14 changes: 7 additions & 7 deletions src/app/robots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ export default function robots(): MetadataRoute.Robots {
rules: [
{
userAgent: '*', // All bots
allow: '/', // Allow all pages to be crawled
disallow: '/private/', // Disallow crawling of the /private/ directory
allow: '/', // Allow all pages to be crawled
disallow: '/private/' // Disallow crawling of the /private/ directory
},
{
userAgent: 'ia_archiver', // Block Internet Archive (Wayback Machine)
disallow: '/', // Disallow access to all pages
},
disallow: '/' // Disallow access to all pages
}
],
sitemap: [
'https://muhammadfiaz.com/sitemap.xml', // First sitemap URL
'https://muhammadfiaz.com/sitemap-0.xml', // Second sitemap URL
],
'https://muhammadfiaz.com/sitemap.xml', // First sitemap URL
'https://muhammadfiaz.com/sitemap-0.xml' // Second sitemap URL
]
};
}
53 changes: 34 additions & 19 deletions src/components/content/AboutMe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,44 @@ import AnimationContainer from '../utils/AnimationContainer';
import { siteConfig } from '@/src/configs/config';

const AboutMe = () => {
return (
<AnimationContainer customClassName="w-full mb-16">
<h2 className="font-bold text-2xl tracking-tight mb-8 text-white text-center lg:text-start">
About Me
</h2>
return (
<AnimationContainer customClassName="w-full mb-16">
<h2 className="font-bold text-2xl tracking-tight mb-8 text-white text-center lg:text-start">
About Me
</h2>

<p className="text-base text-gray-400">
Hey there! 👋 I'm <strong>{siteConfig.author}</strong>, and I've been passionate about coding since I was a child. I fell in love with programming at a young age, spending countless hours learning, experimenting, and creating small projects. Over the years, this passion has grown into a career as a Full Stack developer, where I continue to build innovative solutions that solve real-world problems.
</p>
<p className="text-base text-gray-400">
Hey there! 👋 I'm <strong>{siteConfig.author}</strong>, and I've been
passionate about coding since I was a child. I fell in love with
programming at a young age, spending countless hours learning,
experimenting, and creating small projects. Over the years, this passion
has grown into a career as a Full Stack developer, where I continue to
build innovative solutions that solve real-world problems.
</p>

<p className="text-base text-gray-400 mt-4">
As I’ve evolved in my career, I’ve expanded my expertise into new areas like Machine Learning (ML) and Artificial Intelligence (AI), diving deep into neural networks and other cutting-edge technologies. But no matter how much I learn, I always keep that same excitement and curiosity I had as a child, exploring new fields and technologies that push the boundaries of what’s possible.
</p>
<p className="text-base text-gray-400 mt-4">
As I’ve evolved in my career, I’ve expanded my expertise into new areas
like Machine Learning (ML) and Artificial Intelligence (AI), diving deep
into neural networks and other cutting-edge technologies. But no matter
how much I learn, I always keep that same excitement and curiosity I had
as a child, exploring new fields and technologies that push the
boundaries of what’s possible.
</p>

<p className="text-base text-gray-400 mt-4">
Today, I’m not just focused on building apps and websites; I’m also exploring DevOps tools like Docker, Kubernetes, and AWS to optimize and scale my projects. I believe in continuous learning and growth, and I’m always looking for new challenges that help me expand my skills.
</p>
<p className="text-base text-gray-400 mt-4">
Today, I’m not just focused on building apps and websites; I’m also
exploring DevOps tools like Docker, Kubernetes, and AWS to optimize and
scale my projects. I believe in continuous learning and growth, and I’m
always looking for new challenges that help me expand my skills.
</p>

<p className="text-base text-gray-400 mt-4">
If you’re interested in collaborating on something exciting or need help with a project, feel free to reach out. Let’s create something amazing together!
</p>
</AnimationContainer>
);
<p className="text-base text-gray-400 mt-4">
If you’re interested in collaborating on something exciting or need help
with a project, feel free to reach out. Let’s create something amazing
together!
</p>
</AnimationContainer>
);
};

export default AboutMe;
6 changes: 3 additions & 3 deletions src/components/content/CardProject.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import AnimationContainer from '../utils/AnimationContainer';
import ShowSkills from '../utils/ShowSkills';
import { CardProjectProps } from '@/src/types';
import {
ReactElement,
JSXElementConstructor,
Key,
ReactElement,
ReactFragment,
ReactPortal,
Key
ReactPortal
} from 'react';

const CardProject = ({
Expand Down
Loading

0 comments on commit 7a6c582

Please sign in to comment.