diff --git a/Frontend/src/components/mode-toggle.jsx b/Frontend/src/components/mode-toggle.jsx
index 215f909..3c88737 100644
--- a/Frontend/src/components/mode-toggle.jsx
+++ b/Frontend/src/components/mode-toggle.jsx
@@ -1,26 +1,22 @@
-import { Moon, Sun } from "lucide-react"
-import { useTheme } from "./theme-provider"
-import { Button } from "./ui/button"
-import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "./ui/dropdown-menu"
+import { Moon, Sun } from "lucide-react";
+import { useTheme } from "./theme-provider";
+import { Button } from "./ui/button";
export function ModeToggle() {
- const { setTheme } = useTheme()
+ const { theme, setTheme } = useTheme();
return (
-
-
-
-
-
- setTheme("light")}>Light
- setTheme("dark")}>Dark
- setTheme("system")}>System
-
-
- )
+
+ );
}
-
diff --git a/Frontend/src/components/theme-provider.jsx b/Frontend/src/components/theme-provider.jsx
index 4310ef1..1ac62f5 100644
--- a/Frontend/src/components/theme-provider.jsx
+++ b/Frontend/src/components/theme-provider.jsx
@@ -1,50 +1,26 @@
-import React from "react"
+import React, { createContext, useContext, useEffect, useState } from "react";
-import { createContext, useContext, useEffect, useState } from "react"
+const ThemeContext = createContext({
+ theme: "light",
+ setTheme: () => {},
+});
-const ThemeProviderContext = createContext({
- theme: "system",
- setTheme: () => null,
-})
-
-export function ThemeProvider({ children, defaultTheme = "system", storageKey = "vite-ui-theme", ...props }) {
- const [theme, setTheme] = useState(() => localStorage.getItem(storageKey) || defaultTheme)
+export function ThemeProvider({ children, storageKey = "vite-ui-theme" }) {
+ const [theme, setTheme] = useState(() => localStorage.getItem(storageKey) || "light");
useEffect(() => {
- const root = window.document.documentElement
-
- root.classList.remove("light", "dark")
-
- if (theme === "system") {
- const systemTheme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"
-
- root.classList.add(systemTheme)
- return
- }
-
- root.classList.add(theme)
- }, [theme])
-
- const value = {
- theme,
- setTheme: (theme) => {
- localStorage.setItem(storageKey, theme)
- setTheme(theme)
- },
- }
+ const root = document.documentElement;
+ root.classList.toggle("dark", theme === "dark");
+ localStorage.setItem(storageKey, theme);
+ }, [theme]);
return (
-
+
{children}
-
- )
+
+ );
}
-export const useTheme = () => {
- const context = useContext(ThemeProviderContext)
-
- if (context === undefined) throw new Error("useTheme must be used within a ThemeProvider")
-
- return context
+export function useTheme() {
+ return useContext(ThemeContext);
}
-
diff --git a/Frontend/src/index.jsx b/Frontend/src/index.jsx
index 56aadc5..2133def 100644
--- a/Frontend/src/index.jsx
+++ b/Frontend/src/index.jsx
@@ -2,11 +2,12 @@ import React from "react"
import ReactDOM from "react-dom/client"
import "./styles/globals.css"
import App from "./App"
+import { ThemeProvider } from "./components/theme-provider"
const root = ReactDOM.createRoot(document.getElementById("root"))
root.render(
-
+
- ,
+ ,
)
diff --git a/Frontend/src/pages/BasicDetails.jsx b/Frontend/src/pages/BasicDetails.jsx
index 526119b..34017d8 100644
--- a/Frontend/src/pages/BasicDetails.jsx
+++ b/Frontend/src/pages/BasicDetails.jsx
@@ -1,4 +1,5 @@
import { Button } from "../components/ui/button";
+
import {
Card,
CardContent,
@@ -15,9 +16,9 @@ import {
SelectTrigger,
SelectValue,
} from "../components/ui/select";
-import { Instagram, Youtube, Twitter, BookText as TikTok, Globe, ChevronRight, ChevronLeft,Rocket, Check} from "lucide-react";
+import { Instagram, Youtube, Twitter, BookText as TikTok, Globe, ChevronRight, ChevronLeft,Rocket, Check, Target} from "lucide-react";
import { motion, AnimatePresence } from 'framer-motion';
-import { useState,useEffect} from "react";
+import React, { useState,useEffect} from "react";
import { useParams } from "react-router-dom";
import { UserNav } from "../components/user-nav";
import { MainNav } from "../components/main-nav"
@@ -25,6 +26,15 @@ import { Link } from "react-router-dom"
import { ModeToggle } from "../components/mode-toggle"
+
+
+
+
+
+
+
+
+
export default function BasicDetails() {
const { user } = useParams();
const [step, setStep] = useState(0);
@@ -40,6 +50,36 @@ const nextStep = () => {
}
};
+ //Reset form after clicking rreset
+ const [formData , setFormData] = useState(
+ {
+ firstName: "",
+ lastName: "",
+ email: "",
+ phone: "",
+ category: "",
+ instagram: "",
+ youtube: "",
+ twitter: "",
+ tiktok: "",
+ website: "",
+ });
+// This function will reset the form
+ const resetForm = ()=>{
+ setFormData({
+ firstName: "",
+ lastName: "",
+ email: "",
+ phone: "",
+ category: "",
+ instagram: "",
+ youtube: "",
+ twitter: "",
+ tiktok: "",
+ website: "",
+ });
+ };
+
const prevStep = () => {
if (step > 0) {
setAnimationDirection(-1);
@@ -57,42 +97,41 @@ const nextStep = () => {
return () => clearTimeout(timer);
}, [step]);
-
const InfluencerBasicDetails = () => (
-
-
+
+
-
-
+
+
-
-
+
+
-
-
@@ -102,36 +141,36 @@ const nextStep = () => {
const InfluencerSocialMedia = () => (
-
-
-
+
+
YouTube Channel
-
-
+
+
Twitter Handle
-
-
+
+
TikTok Username
-
-
+
+
Personal Website
@@ -142,34 +181,34 @@ const nextStep = () => {
const InfluencerAudience = () => (
- Total Audience Size
+ Total Audience Size
- Average Engagement Rate (%)
+ Average Engagement Rate (%)
-
-
Primary Platform
+
+ Primary Platform
-
-
+
+
-
- Instagram
- YouTube
- TikTok
- Twitter
+
+ Instagram
+ YouTube
+ TikTok
+ Twitter
-
Primary Audience Age Range
+
Primary Audience Age Range
-
-
+
+
-
+
13-17
18-24
25-34
@@ -184,58 +223,58 @@ const nextStep = () => {
const BrandBasicDetails = () => (
-
Brand Information
- Company Name
+ Brand Information
+ Company Name
- Company Website
+ Company Website
- Industry
+ Industry
-
+
-
- Fashion
- Technology
- Food & Beverage
- Health & Wellness
- Beauty
- Entertainment
+
+ Fashion
+ Technology
+ Food & Beverage
+ Health & Wellness
+ Beauty
+ Entertainment
- Company Size
+ Company Size
-
+
-
- 1-10 employees
- 11-50 employees
- 51-200 employees
- 201-500 employees
- 501+ employees
+
+ 1-10 employees
+ 11-50 employees
+ 51-200 employees
+ 201-500 employees
+ 501+ employees
- Monthly Marketing Budget
-
-
-
+ Monthly Marketing Budget
+
+
+
-
- $0 - $5,000
- $5,001 - $10,000
- $10,001 - $50,000
- $50,001+
+
+ $0 - $5,000
+ $5,001 - $10,000
+ $10,001 - $50,000
+ $50,001+
@@ -245,46 +284,46 @@ const nextStep = () => {
const BrandCampaignPreferences = () => (
-
Campaign Settings
- Target Audience Age Range
+ Campaign Settings
+ Target Audience Age Range
-
-
+
+
-
- 13-17
- 18-24
- 25-34
- 35-44
- 45+
+
+ 13-17
+ 25-34
+ 35-44
+ 18-24
+ 45+
-
-
Preferred Platforms
+
+ Preferred Platforms
-
-
+
+
-
- Instagram
- YouTube
- TikTok
- Twitter
+
+ Instagram
+ YouTube
+ TikTok
+ Twitter
- Primary Campaign Goals
+ Primary Campaign Goals
-
-
+
+
-
- Brand Awareness
- Direct Sales
- Community Engagement
- Brand Loyalty
+
+ Brand Awareness
+ Direct Sales
+ Community Engagement
+ Brand Loyalty
@@ -297,20 +336,20 @@ const nextStep = () => {
switch (step) {
case 0:
return {
- title: "Basic Details",
- description: "Let's start with your personal information",
+ title: (
Basic Details
),
+ description:(
Let's start with your personal information
),
content:
,
};
case 1:
return {
- title: "Social Media Profiles",
- description: "Connect your social media accounts",
+ title: (
Social Media Profiles
),
+ description: (
Social Media Profiles
),
content:
,
};
case 2:
return {
- title: "Audience Information",
- description: "Tell us about your audience and engagement",
+ title: (
Audience Information
),
+ description: (
Audience Information
),
content:
,
};
}
@@ -318,14 +357,14 @@ const nextStep = () => {
switch (step) {
case 0:
return {
- title: "Company Information",
- description: "Tell us about your brand",
- content:
,
+ title: (
Basic Details
),
+ description:(
Tell us about your brand
),
+ content:
,
};
case 1:
return {
- title: "Campaign Preferences",
- description: "Define your target audience and campaign goals",
+ title: (
Campaign Preferences
),
+ description:(
Define your target audience and campaign goals
),
content:
,
};
}
@@ -358,7 +397,7 @@ const nextStep = () => {
-
Inpact
+
Inpact
Need help?
@@ -401,7 +440,7 @@ const nextStep = () => {
index === step ? 'border-purple-600 dark:border-purple-400' : 'border-gray-300 dark:border-gray-600'}`}
>
{index < step ? (
-
+
) : (
{index + 1}
@@ -461,7 +500,7 @@ const nextStep = () => {