diff --git a/pages/hack-school/_meta.json b/pages/hack-school/_meta.json index 9d2f420..41ee202 100644 --- a/pages/hack-school/_meta.json +++ b/pages/hack-school/_meta.json @@ -6,6 +6,6 @@ "week1": "Week 1: HTML, CSS, and JavaScript", "react": "Week 2: React and Next.js", "express": "Week 3: APIs with Express", - "deployment": "Week 4: Debugging and Deployment", - "mongodb": "Week 5: Databases with MongoDB" + "mongodb": "Week 4: Databases with MongoDB", + "deployment": "Week 5: Debugging and Deployment" } \ No newline at end of file diff --git a/pages/hack-school/deployment.mdx b/pages/hack-school/deployment.mdx index 578e287..c798656 100644 --- a/pages/hack-school/deployment.mdx +++ b/pages/hack-school/deployment.mdx @@ -1,4 +1,4 @@ -# Week 4: Debugging and Deployment +# Week 5: Debugging and Deployment ## What is deployment? diff --git a/pages/hack-school/mongodb.mdx b/pages/hack-school/mongodb.mdx index a5cc929..cf3986a 100644 --- a/pages/hack-school/mongodb.mdx +++ b/pages/hack-school/mongodb.mdx @@ -1,4 +1,4 @@ -# Week 5: Databases and MongoDB +# Week 4: Databases and MongoDB ## What is a Database? A database is an organized collection of data or information. It allows people to store information between sessions on a website. diff --git a/src/components/footer/index.tsx b/src/components/footer/index.tsx index b2ea584..56eddbd 100644 --- a/src/components/footer/index.tsx +++ b/src/components/footer/index.tsx @@ -17,37 +17,34 @@ const Footer: React.FC = () => {

Connect With Us!

- + Email - + Discord - - Medium - - - Facebook - - + Github - + Instagram - + LinkedIn - - YouTube + + Facebook
-

Newsletter

-

Receive weekly events and news!

- { const [isMenuOpen, setIsMenuOpen] = useState(false); + + // Inject smooth scroll CSS once + React.useEffect(() => { + const style = document.createElement('style'); + style.innerHTML = 'html { scroll-behavior: smooth; }'; + document.head.appendChild(style); + return () => { + document.head.removeChild(style); + }; + }, []); + + // Custom click handler for hash links + const handleNavClick = (e: React.MouseEvent, href: string) => { + if (href.startsWith('/#')) { + e.preventDefault(); + const id = href.split('#')[1]; + const el = document.getElementById(id); + if (el) { + el.scrollIntoView({ behavior: 'smooth' }); + } + // Optionally close menu on mobile + setIsMenuOpen(false); + // Update URL hash without page reload + window.history.pushState(null, '', href); + } + }; + return ( -