- © {new Date().getFullYear()} DevSync. All rights reserved.
+
+ © {new Date().getFullYear()} DevSync. All rights reserved.
);
};
-export default Footer;
+export default Footer; // Ensure this line is present and correct
diff --git a/frontend/src/Components/ui/Loader.tsx b/frontend/src/Components/ui/Loader.tsx
index d26160b..310d01c 100644
--- a/frontend/src/Components/ui/Loader.tsx
+++ b/frontend/src/Components/ui/Loader.tsx
@@ -1,29 +1,16 @@
-import React from "react";
-import { cn } from "@/lib/utils"; // if you have shadcn's `cn`, else remove
-
-interface LoaderProps {
- className?: string;
- size?: "sm" | "md" | "lg";
-}
-
-const Loader = ({ className, size = "md" }: LoaderProps) => {
- const sizes = {
- sm: "h-4 w-4",
- md: "h-6 w-6",
- lg: "h-10 w-10",
- };
+// frontend/src/Components/ui/Loader.tsx
+import React from 'react';
+const Loader = () => {
return (
-
-
+
);
};
-export default Loader;
+export default Loader; // This line is crucial for fixing the import error
diff --git a/frontend/src/Components/ui/floating-navbar.tsx b/frontend/src/Components/ui/floating-navbar.tsx
index 47c4100..dd860c8 100644
--- a/frontend/src/Components/ui/floating-navbar.tsx
+++ b/frontend/src/Components/ui/floating-navbar.tsx
@@ -1,3 +1,4 @@
+// src/Components/ui/floating-navbar.tsx
"use client";
import React, { JSX, useState } from "react";
import {
@@ -8,33 +9,39 @@ import {
} from "motion/react";
import { cn } from "@/lib/utils";
+/**
+ * Props interface for the FloatingNav component.
+ * 'link' is optional, and 'onClick' is added for custom navigation.
+ */
+interface NavItem {
+ name: string;
+ link?: string; // Optional: for external links or when no custom click handler
+ icon?: JSX.Element;
+ onClick?: () => void; // Optional: for internal, state-based navigation
+}
export const FloatingNav = ({
navItems,
className,
}: {
- navItems: {
- name: string;
- link: string;
- icon?: JSX.Element;
- }[];
+ navItems: NavItem[]; // Use the defined interface
className?: string;
}) => {
const { scrollYProgress } = useScroll();
-
const [visible, setVisible] = useState(false);
+ // Hook to listen to scroll progress changes and control visibility.
useMotionValueEvent(scrollYProgress, "change", (current) => {
- // Check if current is not undefined and is a number
if (typeof current === "number") {
let direction = current! - scrollYProgress.getPrevious()!;
+ // Hide if at the very top, otherwise control visibility based on scroll direction.
if (scrollYProgress.get() < 0.05) {
setVisible(false);
} else {
- if (direction < 0) {
+ if (direction < 0) { // Scrolling up
setVisible(true);
- } else {
+ } else { // Scrolling down
setVisible(false);
}
}
@@ -56,27 +63,45 @@ export const FloatingNav = ({
duration: 0.2,
}}
className={cn(
- "flex max-w-fit fixed top-10 inset-x-0 mx-auto border border-transparent dark:border-white/[0.2] rounded-full dark:bg-black bg-white shadow-[0px_2px_3px_-1px_rgba(0,0,0,0.1),0px_1px_0px_0px_rgba(25,28,33,0.02),0px_0px_0px_1px_rgba(25,28,33,0.08)] z-[5000] pr-2 pl-8 py-2 items-center justify-center space-x-4",
+ "flex max-w-fit fixed top-10 inset-x-0 mx-auto border border-transparent dark:border-white/[0.2] rounded-full dark:bg-black bg-white shadow-[0px_2px_3px_-1px_rgba(0,0,0,0.1),0px_1px_0px_0px_rgba(25,28,33,0.02),0px_0px_0px_1px_rgba(25,28,33,0.08)] z-[5000] pr-2 pl-8 py-2 items-center justify-center space-x-4",
className
)}
>
- {navItems.map((navItem: any, idx: number) => (
-
- {navItem.icon}
- {navItem.name}
-
+ {navItems.map((navItem: NavItem, idx: number) => (
+ // Conditionally render a button if an onClick handler is provided (for internal navigation),
+ // otherwise render an anchor tag (for external links or default behavior).
+ navItem.onClick ? (
+
+ ) : (
+
+ {navItem.icon}
+ {navItem.name}
+
+ )
))}
+ {/* Login button - remains as is */}
);
-}
\ No newline at end of file
+}
diff --git a/frontend/src/Pages/AboutPage.jsx b/frontend/src/Pages/AboutPage.jsx
new file mode 100644
index 0000000..f9d2e83
--- /dev/null
+++ b/frontend/src/Pages/AboutPage.jsx
@@ -0,0 +1,15 @@
+ // frontend/src/Pages/AboutPage.jsx
+ import React from 'react';
+ import About from '../Components/About';
+
+ const AboutPage = () => {
+ return (
+
+ {/* The About section, now on its own dedicated page */}
+
+
+ );
+ };
+
+ export default AboutPage;
+
\ No newline at end of file
diff --git a/frontend/src/Pages/AdPage.jsx b/frontend/src/Pages/AdPage.jsx
new file mode 100644
index 0000000..43bbf93
--- /dev/null
+++ b/frontend/src/Pages/AdPage.jsx
@@ -0,0 +1,15 @@
+ // frontend/src/Pages/AdPage.jsx
+ import React from 'react';
+ import Ad from '../Components/Ad';
+
+ const AdPage = () => {
+ return (
+
+ {/* The Ad section, now on its own dedicated page */}
+
+
+ );
+ };
+
+ export default AdPage;
+
\ No newline at end of file
diff --git a/frontend/src/Pages/ContactPage.jsx b/frontend/src/Pages/ContactPage.jsx
new file mode 100644
index 0000000..e35978c
--- /dev/null
+++ b/frontend/src/Pages/ContactPage.jsx
@@ -0,0 +1,15 @@
+ // frontend/src/Pages/ContactPage.jsx
+ import React from 'react';
+ import Contact from '../Components/contact'; // Assuming 'contact' is the correct component name
+
+ const ContactPage = () => {
+ return (
+
+ {/* The Contact section, now on its own dedicated page */}
+
+
+ );
+ };
+
+ export default ContactPage;
+
\ No newline at end of file
diff --git a/frontend/src/Pages/FeaturesPage.jsx b/frontend/src/Pages/FeaturesPage.jsx
new file mode 100644
index 0000000..4efd836
--- /dev/null
+++ b/frontend/src/Pages/FeaturesPage.jsx
@@ -0,0 +1,14 @@
+// frontend/src/Pages/FeaturesPage.jsx
+import React from 'react';
+import Features from '../Components/Features'; // Import the existing Features component
+
+const FeaturesPage = () => {
+ return (
+
+ {/* The Features section, now on its own dedicated page */}
+
+
+ );
+};
+
+export default FeaturesPage;
diff --git a/frontend/src/Pages/HomePage.jsx b/frontend/src/Pages/HomePage.jsx
new file mode 100644
index 0000000..1e84c96
--- /dev/null
+++ b/frontend/src/Pages/HomePage.jsx
@@ -0,0 +1,16 @@
+// frontend/src/Pages/HomePage.jsx
+import React from 'react';
+import Hero from '../Components/Hero';
+// Features component is removed from here as it now has its own page
+
+const HomePage = () => {
+ return (
+
+ {/* The Hero section for the main landing page */}
+
+ {/* Features component is no longer rendered directly here */}
+
+ );
+};
+
+export default HomePage;
diff --git a/frontend/src/main.jsx b/frontend/src/main.jsx
index 91f4fbd..817d48e 100644
--- a/frontend/src/main.jsx
+++ b/frontend/src/main.jsx
@@ -1,18 +1,12 @@
-// src/main.jsx
-import { StrictMode } from 'react';
-import { createRoot } from 'react-dom/client';
-import './index.css';
-import { BrowserRouter, Routes, Route } from 'react-router-dom';
+// frontend/src/main.jsx
+import React from 'react';
+import ReactDOM from 'react-dom/client';
import App from './App.jsx';
-import NotFound from './Components/ui/NotFound.jsx'; // ✅ 404 page
+import './index.css';
-createRoot(document.getElementById('root')).render(
-
-
-
- } />
- } /> {/* ✅ Catch-all route */}
-
-
-
+ReactDOM.createRoot(document.getElementById('root')).render(
+
+ {/* Remove from here if it exists */}
+
+ ,
);