diff --git a/src/app/(auth)/onboarding/_components/PageWrapper.tsx b/src/app/(auth)/onboarding/_components/PageWrapper.tsx index 094b624..a84e4dd 100644 --- a/src/app/(auth)/onboarding/_components/PageWrapper.tsx +++ b/src/app/(auth)/onboarding/_components/PageWrapper.tsx @@ -20,23 +20,18 @@ function PageWrapper({ children }: PageWrapperProps) { return () => clearTimeout(timer) }, []) - if (isLoading) { - return ( -
-
- -
- -
- ) - } - return ( <>
- {children} + {isLoading ? ( +
+ +
+ ) : ( + children + )} ) } diff --git a/src/app/(user)/home/page.tsx b/src/app/(user)/home/page.tsx index 9eeb998..3af7cf6 100644 --- a/src/app/(user)/home/page.tsx +++ b/src/app/(user)/home/page.tsx @@ -1,5 +1,4 @@ import ProjectCard from "@/components/ProjectCard"; -import DemoOne from "@/components/ShaderBackground"; import CollapsibleHeader from "@/components/CollapseHeadbar"; // Ensure this path is correct export default function Home() { @@ -9,9 +8,6 @@ export default function Home() { title="Projects" subheading="Projects the community is building" /> -
- -
diff --git a/src/app/(user)/profile/[profileId]/_components/ProfileContent.tsx b/src/app/(user)/profile/[profileId]/_components/ProfileContent.tsx index 9ed731f..e4d4062 100644 --- a/src/app/(user)/profile/[profileId]/_components/ProfileContent.tsx +++ b/src/app/(user)/profile/[profileId]/_components/ProfileContent.tsx @@ -25,6 +25,7 @@ import { signOut, useSession } from "next-auth/react"; import { getUserContributions } from "../../../../../../actions/applications"; import { Project, Profile, Contribution } from "@/types/profile"; import Loader from "@/components/Loader"; +import { getSkillIcon } from "@/lib/skillIcons"; interface ProfileContentProps { profileId?: string; @@ -251,21 +252,25 @@ function ProfileContent({ profileId }: ProfileContentProps) { Skills
- {profile.skills.map((skill, index) => ( - - { + const Icon = getSkillIcon(skill); + return ( + - {skill} - - - ))} + + {Icon && } + {skill} + + + ); + })}
)} diff --git a/src/app/(user)/profile/[profileId]/_components/ProfilePageWrapper.tsx b/src/app/(user)/profile/[profileId]/_components/ProfilePageWrapper.tsx index ebe6080..89d57da 100644 --- a/src/app/(user)/profile/[profileId]/_components/ProfilePageWrapper.tsx +++ b/src/app/(user)/profile/[profileId]/_components/ProfilePageWrapper.tsx @@ -1,7 +1,6 @@ "use client" import { useState, useEffect } from "react" -import DemoOne from "@/components/ShaderBackground" import Loader from "@/components/Loader" import ProfileContent from "./ProfileContent"; @@ -24,21 +23,11 @@ function ProfilePageWrapper({ profileId }: ProfilePageWrapperProps) { return (
-
- -
) } - return ( - <> -
- -
- - - ) + return } export default ProfilePageWrapper; \ No newline at end of file diff --git a/src/app/(user)/profile/[profileId]/test/page.tsx b/src/app/(user)/profile/[profileId]/test/page.tsx index 234ad58..b7d9586 100644 --- a/src/app/(user)/profile/[profileId]/test/page.tsx +++ b/src/app/(user)/profile/[profileId]/test/page.tsx @@ -1,4 +1,3 @@ -import DemoOne from "@/components/ShaderBackground"; import { ExternalLink, Github, Calendar, Users } from "lucide-react"; import { notFound } from "next/navigation"; import Link from "next/link"; @@ -141,10 +140,6 @@ export default async function ProjectPage({ params }: ProjectPageProps) { return ( <> -
- -
-
diff --git a/src/app/(user)/profile/applications/page.tsx b/src/app/(user)/profile/applications/page.tsx index 7b7a3b7..acd4ef5 100644 --- a/src/app/(user)/profile/applications/page.tsx +++ b/src/app/(user)/profile/applications/page.tsx @@ -1,5 +1,4 @@ // app/(user)/profile/applications/page.tsx -import DemoOne from "@/components/ShaderBackground"; import { getServerSession } from "next-auth"; import { authOptions } from "@/lib/authOptions"; import { redirect } from "next/navigation"; @@ -31,10 +30,6 @@ export default async function MyApplicationsPage() { return ( <> -
- -
-
diff --git a/src/app/(user)/projects/[id]/applications/page.tsx b/src/app/(user)/projects/[id]/applications/page.tsx index 29ced7b..0c0aa99 100644 --- a/src/app/(user)/projects/[id]/applications/page.tsx +++ b/src/app/(user)/projects/[id]/applications/page.tsx @@ -1,4 +1,4 @@ -import DemoOne from "@/components/ShaderBackground"; + import { getServerSession } from "next-auth"; import { authOptions } from "@/lib/authOptions"; import { redirect } from "next/navigation"; @@ -35,10 +35,6 @@ export default async function ApplicationsPage({ params }: ApplicationsPageProps return ( <> -
- -
-
diff --git a/src/app/(user)/projects/[id]/page.tsx b/src/app/(user)/projects/[id]/page.tsx index 49b68b3..e577f90 100644 --- a/src/app/(user)/projects/[id]/page.tsx +++ b/src/app/(user)/projects/[id]/page.tsx @@ -1,5 +1,4 @@ import { Metadata } from "next"; -import DemoOne from "@/components/ShaderBackground"; import { ExternalLink, Github, Calendar, Users } from "lucide-react"; import { notFound } from "next/navigation"; import Link from "next/link"; @@ -180,10 +179,6 @@ export default async function ProjectPage({ params }: ProjectPageProps) { return ( <> -
- -
-
diff --git a/src/app/contact/page.tsx b/src/app/contact/page.tsx index ca68f11..c71a29f 100644 --- a/src/app/contact/page.tsx +++ b/src/app/contact/page.tsx @@ -6,7 +6,6 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { z } from "zod"; import { toast } from "sonner"; import { Loader2, Mail, User, MessageSquare, Send } from "lucide-react"; -import DemoOne from "@/components/ShaderBackground"; import { cn } from "@/lib/utils"; import { sendContactEmail } from "../../../actions/contact"; @@ -59,9 +58,6 @@ export default function Contact() { return ( <> -
- -
diff --git a/src/components/ClientLayoutShell.tsx b/src/components/ClientLayoutShell.tsx index 4b868f7..b0b25db 100644 --- a/src/components/ClientLayoutShell.tsx +++ b/src/components/ClientLayoutShell.tsx @@ -4,8 +4,9 @@ import { ProjectStackDock } from "@/components/ProjectStackNavbar"; import { CreateProjectModal } from "@/components/CreateProjectModal"; import { LoginModal } from "@/components/LoginModal"; import { useState, useEffect } from "react"; -import { useSession } from "next-auth/react"; +import { useSession } from "next-auth/react"; import { Toaster } from "sonner"; +import DemoOne from "@/components/ShaderBackground"; type ClientLayoutShellProps = { children: React.ReactNode; @@ -13,9 +14,9 @@ type ClientLayoutShellProps = { export function ClientLayoutShell({ children }: ClientLayoutShellProps) { const pathname = usePathname(); - const { data: session } = useSession(); + const { data: session } = useSession(); const isEntryPage = pathname === "/" || pathname === "/onboarding"; - + const [isCreateModalOpen, setIsCreateModalOpen] = useState(false); const [isLoginModalOpen, setIsLoginModalOpen] = useState(false); const [profileId, setProfileId] = useState(); @@ -24,13 +25,13 @@ export function ClientLayoutShell({ children }: ClientLayoutShellProps) { const fetchProfileId = async () => { if (session?.user?.email) { try { - const response = await fetch('/api/profile'); + const response = await fetch("/api/profile"); if (response.ok) { const data = await response.json(); setProfileId(data.profileId); } } catch (error) { - console.error('Error fetching profile:', error); + console.error("Error fetching profile:", error); } } else { setProfileId(undefined); @@ -55,22 +56,27 @@ export function ClientLayoutShell({ children }: ClientLayoutShellProps) { return ( <> - + {!isEntryPage && ( +
+ +
+ )} + {children} {!isEntryPage && ( - + /> )} - setIsCreateModalOpen(false)} + setIsCreateModalOpen(false)} /> - setIsLoginModalOpen(false)} + setIsLoginModalOpen(false)} /> );