From 84fd38448c07b3f8a4d88dc46d06129a9e50b6fc Mon Sep 17 00:00:00 2001 From: Priyanshu Maurya Date: Sun, 16 Jul 2023 23:38:38 +0530 Subject: [PATCH] fix: Added `Navbar` Component in the layout. (#1712) * Added `Navbar` Component in the layout. * made required changes --------- Co-authored-by: Priyankar Pal <88102392+priyankarpal@users.noreply.github.com> --- app/docs/page.tsx | 110 +++++++++++++++---------------- app/layout.tsx | 4 +- app/page.tsx | 2 - app/projects/[username]/page.tsx | 4 -- app/projects/page.tsx | 4 -- components/Navbar.tsx | 1 + 6 files changed, 57 insertions(+), 68 deletions(-) diff --git a/app/docs/page.tsx b/app/docs/page.tsx index f88121bf..ebf28323 100644 --- a/app/docs/page.tsx +++ b/app/docs/page.tsx @@ -2,7 +2,6 @@ import { useEffect, ReactNode, useState } from "react"; import SyntaxHighlighter from "react-syntax-highlighter"; import { anOldHope } from "react-syntax-highlighter/dist/esm/styles/hljs"; -import { Navbar } from "@/components"; import Image from "next/image"; import { MdOutlineContentCopy } from "react-icons/md"; import { BsCheck2Circle } from "react-icons/bs"; @@ -224,62 +223,59 @@ function AddYourProjectsGuide(): JSX.Element { )); return ( - <> - -
-
- -
-
- - -
-
-

- Follow the following steps to add your projects to ProjectsHut: -

-
{stepsRender}
-
-
- +
+
+ +
+
+ + +
+
+

+ Follow the following steps to add your projects to ProjectsHut: +

+
{stepsRender}
+
+
); } diff --git a/app/layout.tsx b/app/layout.tsx index bd770300..3f6a69a7 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,7 +1,7 @@ import "./globals.css"; import { Inter } from "next/font/google"; import { MobileNavBar } from "@/components/MobileNavbar"; -import { Footer } from "@/components" +import { Navbar, Footer } from "@/components"; const inter = Inter({ subsets: ["latin"] }); @@ -20,6 +20,8 @@ export default function RootLayout({ return ( + + {children} diff --git a/app/page.tsx b/app/page.tsx index b6128330..4d83091d 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -3,12 +3,10 @@ import Link from "next/link"; import Banner from "../components/Banner"; import Image from "next/image"; import images from "../DB/homepage-image.json"; -import { Navbar, } from "@/components"; export default function HomePage() { return (
-
diff --git a/app/projects/[username]/page.tsx b/app/projects/[username]/page.tsx index 7c1f3318..95ed6800 100644 --- a/app/projects/[username]/page.tsx +++ b/app/projects/[username]/page.tsx @@ -17,7 +17,6 @@ import { IoClose } from "react-icons/io5"; import projects from "../../../DB/projects.json"; import Image from "next/image"; -import { Navbar } from "@/components"; interface userType { bio?: string; } @@ -91,8 +90,6 @@ function ProjectList() { }; return ( - <> -
{initialLoading} {/* Left side profile section */} @@ -302,7 +299,6 @@ function ProjectList() {
)}{" "}
- ); } export default ProjectList; diff --git a/app/projects/page.tsx b/app/projects/page.tsx index 6455d2c0..d056e016 100644 --- a/app/projects/page.tsx +++ b/app/projects/page.tsx @@ -12,7 +12,6 @@ import { shuffleProjects } from "../../utils/paginate"; import ProjectCard from "../../components/ProjectCard"; import projects from "../../DB/projects.json"; import { useRouter } from "next/navigation"; -import { Navbar } from "@/components"; interface NewProjectsType { username: string; @@ -203,8 +202,6 @@ const ProjectsPage: NextPage = () => { } }; return ( - <> -
Search for cool Projects @@ -363,7 +360,6 @@ const ProjectsPage: NextPage = () => { )}
- ); }; diff --git a/components/Navbar.tsx b/components/Navbar.tsx index d6bff2b0..e3d32cf5 100644 --- a/components/Navbar.tsx +++ b/components/Navbar.tsx @@ -1,3 +1,4 @@ +"use client"; import React, { Suspense } from "react"; import { NextPage } from "next"; import Link from "next/link";