update (main header): copy

This commit is contained in:
MTG2000
2022-11-10 18:07:03 +02:00
parent 2b178922dd
commit 5633dc419b
4 changed files with 22 additions and 43 deletions

View File

@@ -1,41 +1,13 @@
import { BsSearch } from "react-icons/bs";
import { motion } from "framer-motion";
import { useAppSelector, useCurrentSection } from "src/utils/hooks";
import ASSETS from "src/assets";
import IconButton from "../IconButton/IconButton";
import { Link, useNavigate } from "react-router-dom";
import { ReactNode, useState } from "react";
import {
Menu,
MenuItem,
MenuButton,
} from '@szhsin/react-menu';
import { Link, } from "react-router-dom";
import { ReactNode, } from "react";
import '@szhsin/react-menu/dist/index.css';
import { FiChevronDown } from "react-icons/fi";
import { createRoute, PAGES_ROUTES } from "src/utils/routing";
import Button from "../Button/Button";
import { BiRocket } from "react-icons/bi";
import { PAGES_ROUTES } from "src/utils/routing";
interface Props {
cta?: ReactNode
}
export default function NavDesktop(props: Props) {
const [searchOpen, setSearchOpen] = useState(false)
const { curUser } = useAppSelector((state) => ({
curUser: null,
}));
const openSearch = () => {
setSearchOpen(true);
};
const currentSection = useCurrentSection();
const navigate = useNavigate()
return (
@@ -61,7 +33,7 @@ export default function NavDesktop(props: Props) {
</defs>
</svg>
<span className="hidden sm:inline text-body2 md:text-body1 font-extrabold">Lightning Landscape</span>
<span className="hidden sm:inline text-body3 md:text-body2 font-extrabold">Lightning Landscape</span>
</h2>
</Link>
<ul className="ml-auto">

View File

@@ -1,13 +1,8 @@
import NavMobile from "./NavMobile";
import { MdComment, MdHomeFilled, MdLocalFireDepartment } from "react-icons/md";
import { useCallback, useEffect, } from "react";
import { useAppDispatch, useCurrentSection, useMediaQuery, useResizeListener } from "src/utils/hooks";
import { setNavHeight } from "src/redux/features/ui.slice";
import NavDesktop from "./NavDesktop";
import { MEDIA_QUERIES } from "src/utils/theme/media_queries";
import { IoMdTrophy } from "react-icons/io";
import Button from "../Button/Button";
import { FiArrowRight } from "react-icons/fi";
import { BiRocket } from "react-icons/bi";
import { Link } from "react-router-dom";

View File

@@ -110,7 +110,7 @@ export default function FiltersModal({ onClose, direction, initFilters, callback
<hr className="bg-gray-100" />
<div>
<h3 className="text-body2 font-bolder">🌈 Category</h3>
<p className='text-gray-600 mt-8'>Select one or more tags to search from.</p>
<p className='text-gray-600 mt-8'>Select a category to search from.</p>
<ul className="flex flex-wrap gap-16 mt-24">
{query.data?.categoryList
?.filter(c => !!(c && c.name))

View File

@@ -19,12 +19,19 @@ export default function Header(props: Props) {
const onSearchPage = !onCategoryPage && !filtersEmpty
const title = onCategoryPage ? `${props.selectedCategry?.name} projects` :
filtersEmpty ? "Discover 1,592 lightning projects" : "All lightning projects";
const currentHeader = onCategoryPage ? 'category' : (filtersEmpty ? "all-default" : "all-search");
const title = currentHeader === 'category' ? `${props.selectedCategry?.name} projects`
: currentHeader === 'all-default' ? "Everything lightning network in one place"
: currentHeader === 'all-search' ? "All lightning projects" : ""
const subtitle = currentHeader === 'category' ? ""
: currentHeader === 'all-default' ? "Use our searchable data platform to discover 1,542 lightning projects & companies"
: currentHeader === 'all-search' ? "" : ""
const subtitle = onCategoryPage ? "" :
filtersEmpty ? "Explore a directory of lightning startups, projects, and companies"
: ""
return (
@@ -53,3 +60,8 @@ export default function Header(props: Props) {
</div>
)
}
const mapTitle = {
'category': ""
}