Skip to content

Commit

Permalink
Removed footer and header Links
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayushmaanagarwal1211 committed Jan 13, 2025
1 parent 5d3c1b6 commit 114e109
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 3 additions & 1 deletion website3.0/components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ function Footer() {
const isProfile = pathname && pathname.startsWith("/profile"); // Check if path starts with '/admin'
const isDevopsForum = pathname && pathname.startsWith("/devopsforum");
const isCreateForum = pathname && pathname.startsWith("/createforum");
const isPremium = pathname && pathname.startsWith("/plans");

let { theme } = useContext(Context);
return (
<div
className={`${theme ? "bg-gray-100" : "bg-[#1e1d1d]"} ${
isAdmin || isProfile || isDevopsForum || isCreateForum ? "hidden" : "block"
isAdmin || isProfile || isDevopsForum || isCreateForum ||isPremium? "hidden" : "block"
} pt-12 pb-6 flex flex-col items-center justify-center text-center w-full transition-colors duration-500`}
>
{/* Social media icons */}
Expand Down
14 changes: 8 additions & 6 deletions website3.0/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ const Header = () => {
const isProfile = pathname && pathname.startsWith("/profile"); // Check if path starts with '/profile'
const isCreateBlog = pathname && pathname.startsWith("/createblog"); // Check if path starts with '/createblog'
const isDevopsForum = pathname && pathname.startsWith("/devopsforum");
const isPremium = pathname && pathname.startsWith("/plans");

const isCreateForum = pathname && pathname.startsWith("/createforum");
let { theme, isAdminShow, isLogin, setIsPopup, setMsg, setSearchedBlog } =
useContext(Context);
Expand Down Expand Up @@ -107,7 +109,7 @@ const Header = () => {
} z-50 fixed top-0 transition-all overflow-hidden py-2 ${
show ? "top-0" : "top-[-550px]"
} ${isAdmin ? "hidden" : "block"} ${
isBlogs || isCreateBlog || isProfile || isDevopsForum || isCreateForum
isBlogs || isCreateBlog || isProfile || isDevopsForum || isCreateForum
? "hidden"
: "block"
} `}
Expand All @@ -132,7 +134,7 @@ const Header = () => {
theme
? "bg-white shadow-gray-300"
: "bg-[#393838] shadow-[#000000a6]"
} list-none flex gap-5 py-2 px-5 nav_links rounded-3xl flex-wrap justify-center shadow-md justify-self-end max-xl:hidden transition-colors duration-500`}
} ${isPremium?"opacity-0":""} list-none flex gap-5 py-2 px-5 nav_links rounded-3xl flex-wrap justify-center shadow-md justify-self-end max-xl:hidden transition-colors duration-500`}
>
<li
className={`${
Expand Down Expand Up @@ -164,8 +166,8 @@ const Header = () => {
</li>
</ul>
{/* Navigation actions (sponsor button and toggle switch) */}
<div className="flex items-center gap-2">
{isAdminShow ? (
<div className={`${isPremium?"hidden":""} flex items-center gap-2 `}>
{(isAdminShow ? (
<a href="https://www.helpopshub.com/admin" target="_blank">
<button
className={`${
Expand All @@ -192,7 +194,7 @@ const Header = () => {
Sponsor
</button>
</a>
)}
))}
<div className="block max-xl:hidden">
<AuthButton />
</div>
Expand All @@ -204,7 +206,7 @@ const Header = () => {
</div>
{/* Hamburger menu icon for mobile */}
<div
className={`hamburger ${isActive ? "open" : ""}`}
className={`hamburger ${isActive ? "open" : ""} ${isPremium?"hidden":""}`}
id="hamburger"
onClick={toggleMenu}
>
Expand Down

0 comments on commit 114e109

Please sign in to comment.