Skip to content

Commit 6d260ef

Browse files
chore: upgrade Next.js 12 --> 15, React 18 --> 19
1 parent 6832913 commit 6d260ef

File tree

11 files changed

+6695
-2807
lines changed

11 files changed

+6695
-2807
lines changed

components/Hero.jsx

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Image from 'next/image';
1+
import Image from "next/image";
22
import { useRef, useState } from 'react';
33
import { greetingList } from '../data/greetings';
44
import UserImg from '../public/assets/images/icons/shafin-logo.png';
@@ -33,8 +33,8 @@ const Hero = () => {
3333
}, 50);
3434
};
3535
return (
36-
<section>
37-
<div className='flex items-center justify-center md:flex-row flex-col'>
36+
(<section>
37+
<div className='flex items-center justify-center md:flex-row flex-col'>
3838
<div className='my-16'>
3939
<div className='relative h-44 w-44 flex justify-center items-center'>
4040
<div
@@ -44,11 +44,14 @@ const Hero = () => {
4444
>
4545
<div className='wrap-avater'>
4646
<Image
47-
src={UserImg}
48-
alt='Avatar'
49-
draggable='false'
50-
className='!mb-6'
51-
/>
47+
src={UserImg}
48+
alt='Avatar'
49+
draggable='false'
50+
className='!mb-6'
51+
style={{
52+
maxWidth: "100%",
53+
height: "auto"
54+
}} />
5255
</div>
5356
<div className='absolute bottom-0 flex-col items-center hidden w-32 -ml-[100px] mb-64 lg:group-hover:flex'>
5457
<span className='p-2 w-32 h-[50px] relative z-10 text-xs leading-none text-sh-white whitespace-no-wrap bg-sh-dark shadow-lg rounded-md'>
@@ -93,7 +96,7 @@ const Hero = () => {
9396
</h1>
9497
</div>
9598
</div>
96-
<div
99+
<div
97100
className='absolute left-1/2 top-0 -z-10 -translate-x-1/2 blur-3xl xl:-top-6'
98101
aria-hidden='true'
99102
>
@@ -105,8 +108,8 @@ const Hero = () => {
105108
}}
106109
/>
107110
</div>
108-
</section>
109-
);
111+
</section>)
112+
);
110113
};
111114

112115
export default Hero;

components/LoginBtn.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { signIn, signOut, useSession } from 'next-auth/react';
1+
// import { signIn, signOut, useSession } from 'next-auth/react';
22
import { FaGithub } from 'react-icons/fa';
33

44
export default function Component() {
5-
const { data: session } = useSession();
6-
if (session) {
7-
return <button onClick={() => signOut()}>Sign out</button>;
8-
}
5+
// const { data: session } = useSession();
6+
// if (session) {
7+
// return <button onClick={() => signOut()}>Sign out</button>;
8+
// }
99
return (
1010
<button
1111
onClick={() => signIn('github')}

components/NavBar.jsx

Lines changed: 43 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Image from 'next/image';
1+
import Image from "next/image";
22
import Link from 'next/link';
33
import { useRouter } from 'next/router';
44
import { useState } from 'react';
@@ -18,8 +18,8 @@ const NavBar = () => {
1818
];
1919

2020
return (
21-
<div className='bg-sh-dark-500 bg-opacity-80 fixed w-full top-0 z-20 backdrop-filter backdrop-blur-sm shadow-lg mb-28'>
22-
<div className='max-w-[50rem] mx-auto w-full px-5 py-2.5 md:px-10 lg:px-0'>
21+
(<div className='bg-sh-dark-500 bg-opacity-80 fixed w-full top-0 z-20 backdrop-filter backdrop-blur-sm shadow-lg mb-28'>
22+
<div className='max-w-[50rem] mx-auto w-full px-5 py-2.5 md:px-10 lg:px-0'>
2323
<div className='flex items-center w-full'>
2424
<div className='w-3/4 justify-start items-center inline-flex'>
2525
<div className='dropdown'>
@@ -33,48 +33,53 @@ const NavBar = () => {
3333
<ul className='border border-sh-white-500 bg-sh-dark-500 bg-opacity-[0.97] backdrop-filter shadow-lg shadow-sh-dark-500 rounded-md absolute mt-3 px-2 py-5 w-64 space-y-5'>
3434
{webLinks.map((link, index) => (
3535
<li key={index} onClick={() => setIsMenuOpen(false)}>
36-
<Link href={link.path}>
37-
<a
38-
className={
39-
router.pathname == link.path
40-
? 'menu-item active'
41-
: 'menu-item'
42-
}
43-
>
44-
{link.name}
45-
</a>
46-
</Link>
36+
<Link
37+
href={link.path}
38+
className={
39+
router.pathname == link.path
40+
? 'menu-item active'
41+
: 'menu-item'
42+
}>
43+
44+
{link.name}
45+
46+
</Link>
4747
</li>
4848
))}
4949
</ul>
5050
)}
5151
</div>
52-
<Link href='/'>
53-
<a className='rounded-full border-2 border-sh-blue flex mr-7 w-10 h-10 scale-90 hover:scale-100 transition ease-in select-none'>
54-
<Image
55-
className='rounded-full'
56-
src={UserImg}
57-
alt='Shafin Avatar'
58-
objectFit='contain'
59-
draggable='false'
60-
/>
61-
</a>
62-
</Link>
52+
<Link
53+
href='/'
54+
className='rounded-full border-2 border-sh-blue flex mr-7 w-10 h-10 scale-90 hover:scale-100 transition ease-in select-none'>
55+
56+
<Image
57+
className='rounded-full'
58+
src={UserImg}
59+
alt='Shafin Avatar'
60+
draggable='false'
61+
style={{
62+
maxWidth: "100%",
63+
height: "auto",
64+
objectFit: "contain"
65+
}} />
66+
67+
</Link>
6368
<div className='hidden md:flex'>
6469
<ul className='inline-flex flex-row gap-3'>
6570
{webLinks.map((link, index) => (
6671
<li key={index}>
67-
<Link href={link.path}>
68-
<a
69-
className={
70-
router.pathname == link.path
71-
? 'menu-item active'
72-
: 'menu-item'
73-
}
74-
>
75-
{link.name}
76-
</a>
77-
</Link>
72+
<Link
73+
href={link.path}
74+
className={
75+
router.pathname == link.path
76+
? 'menu-item active'
77+
: 'menu-item'
78+
}>
79+
80+
{link.name}
81+
82+
</Link>
7883
</li>
7984
))}
8085
</ul>
@@ -94,8 +99,8 @@ const NavBar = () => {
9499
</div>
95100
</div>
96101
</div>
97-
</div>
98-
);
102+
</div>)
103+
);
99104
};
100105

101106
export default NavBar;

components/PinnedRepo.jsx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,23 @@ const PinnedRepo = () => {
3131
fetchRepositoriesData();
3232
}, []);
3333
return (
34-
<section>
35-
<Heading text='Featured Repositories' />
36-
<div className='space-y-4 mt-3'>
34+
(<section>
35+
<Heading text='Featured Repositories' />
36+
<div className='space-y-4 mt-3'>
3737
<RepoCard repos={repositories} />
3838
</div>
39-
<div className='flex justify-center'>
40-
<Link href='/open-source'>
41-
<a className='gap-2 text-sh-blue hover:text-sh-blue-500 text-base mt-10 transition ease-in w-auto flex justify-center'>
42-
<p>More Repositories</p>
43-
<HiCursorClick className='text-xl inline-block' />
44-
</a>
45-
</Link>
39+
<div className='flex justify-center'>
40+
<Link
41+
href='/open-source'
42+
className='gap-2 text-sh-blue hover:text-sh-blue-500 text-base mt-10 transition ease-in w-auto flex justify-center'>
43+
44+
<p>More Repositories</p>
45+
<HiCursorClick className='text-xl inline-block' />
46+
47+
</Link>
4648
</div>
47-
</section>
48-
);
49+
</section>)
50+
);
4951
};
5052

5153
export default PinnedRepo;

0 commit comments

Comments
 (0)