Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: redirect to home when click on techmart logo #416

Merged
merged 2 commits into from
Oct 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/components/molecules/NavHome.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ export default function NavHome() {
id="hero"
className="relative px-8 py-9 flex items-center justify-between z-10"
>
<h1 className="font-cabinetGrotesk text-primary-500 font-bold text-2xl">
tech
<span className="text-secondary-500">mart</span>
</h1>
<Link to="/">
<h1 className="font-cabinetGrotesk text-primary-500 font-bold text-2xl hover:cursor-pointer">
tech
<span className="text-secondary-500">mart</span>
</h1>
</Link>
<div className="border-primary-500 border rounded-xl p-3 md:hidden">
<img
className=""
Expand Down
86 changes: 44 additions & 42 deletions src/pages/Home.jsx
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
import React, { useEffect } from "react";
import { Link } from "react-router-dom";
import React, { useEffect } from 'react';
import { Link } from 'react-router-dom';

import { Swiper, SwiperSlide } from "swiper/react";
import "swiper/css";
import "swiper/css/bundle";
import "swiper/css/pagination";
import "swiper/css/navigation";
import { Pagination, Navigation } from "swiper";
import closeMenuIcon from "../assets/icons/close-icon.png";
import { Swiper, SwiperSlide } from 'swiper/react';
import 'swiper/css';
import 'swiper/css/bundle';
import 'swiper/css/pagination';
import 'swiper/css/navigation';
import { Pagination, Navigation } from 'swiper';
import closeMenuIcon from '../assets/icons/close-icon.png';

import menuIcon from "../assets/icons/menu-icon.svg";
import "./home.css";
import wavyArrow from "../assets/icons/landingpage__wavy-arrow.svg";
import wavyUnderline from "../assets/icons/landingpage__wavy-underline.svg";
import bestQuality from "../assets/icons/landingpage__best-quality.svg";
import meetnconnect from "../assets/icons/landingpage__meetnconnect.svg";
import support from "../assets/icons/landingpage__support.svg";
import wavyDashed from "../assets/icons/landingpage__wavy-dashed.svg";
import keyboard from "../assets/images/product-keyboard.png";
import controller from "../assets/images/product-controller.png";
import cartIcon from "../assets/icons/cart-icon.svg";
import profileImg from "../assets/images/landingpage__client-profile-img.svg";
import p2p from "../assets/icons/landingpage__p2p.svg";
import heroClipArtLeft from "../assets/images/landingpage-hero-clipart-left.svg";
import heroClipArtRight from "../assets/images/landingpage-hero-clipart-right.svg";
import logo from "../assets/icons/logo.svg";
import facebook from "../assets/icons/footer-fb.svg";
import twitter from "../assets/icons/twitter.svg";
import instagram from "../assets/icons/instagram.svg";
import linkedin from "../assets/icons/linkedin.svg";
import upArrow from "../assets/icons/up-arrow.svg";
import MainNav from "../components/molecules/MainNav";
import Footer from "../components/molecules/Footer";
import AOS from "aos";
import "aos/dist/aos.css";
import menuIcon from '../assets/icons/menu-icon.svg';
import './home.css';
import wavyArrow from '../assets/icons/landingpage__wavy-arrow.svg';
import wavyUnderline from '../assets/icons/landingpage__wavy-underline.svg';
import bestQuality from '../assets/icons/landingpage__best-quality.svg';
import meetnconnect from '../assets/icons/landingpage__meetnconnect.svg';
import support from '../assets/icons/landingpage__support.svg';
import wavyDashed from '../assets/icons/landingpage__wavy-dashed.svg';
import keyboard from '../assets/images/product-keyboard.png';
import controller from '../assets/images/product-controller.png';
import cartIcon from '../assets/icons/cart-icon.svg';
import profileImg from '../assets/images/landingpage__client-profile-img.svg';
import p2p from '../assets/icons/landingpage__p2p.svg';
import heroClipArtLeft from '../assets/images/landingpage-hero-clipart-left.svg';
import heroClipArtRight from '../assets/images/landingpage-hero-clipart-right.svg';
import logo from '../assets/icons/logo.svg';
import facebook from '../assets/icons/footer-fb.svg';
import twitter from '../assets/icons/twitter.svg';
import instagram from '../assets/icons/instagram.svg';
import linkedin from '../assets/icons/linkedin.svg';
import upArrow from '../assets/icons/up-arrow.svg';
import MainNav from '../components/molecules/MainNav';
import Footer from '../components/molecules/Footer';
import AOS from 'aos';
import 'aos/dist/aos.css';

function App() {
useEffect(() => {
AOS.init();
}, []);

const toggleMenu = () => {
const nav = document.getElementById("nav");
const body = document.getElementById("body");
const nav = document.getElementById('nav');
const body = document.getElementById('body');
// var navItems = document.querySelectorAll("nav a")
body.style.overflowY = "hidden";
nav.classList.toggle("hidden");
body.style.overflowY = 'hidden';
nav.classList.toggle('hidden');
};
return (
<>
Expand All @@ -55,10 +55,12 @@ function App() {
id="hero"
className="relative bg-primary-50 px-8 py-9 flex items-center justify-between"
>
<h1 className="font-cabinetGrotesk text-primary-500 font-bold text-2xl">
tech
<span className="text-secondary-500">mart</span>
</h1>
<Link to="/">
<h1 className="font-cabinetGrotesk text-primary-500 font-bold text-2xl hover:cursor-pointer">
tech
<span className="text-secondary-500">mart</span>
</h1>
</Link>
<div className="border-primary-500 border rounded-xl p-3 lg:hidden">
<img
className=""
Expand Down