Merge pull request #50 from KieIO/m7-lytran

M7 Ly: fix styles banner, header
This commit is contained in:
lytrankieio123
2021-09-14 15:31:38 +07:00
committed by GitHub
7 changed files with 26 additions and 11 deletions

View File

@@ -8,7 +8,7 @@ interface Props {
const option = { const option = {
slidesPerView: 1, slidesPerView: 1,
breakpoints: {} mode: 'free',
} }
const Banner = memo(({ data }: Props) => { const Banner = memo(({ data }: Props) => {
if (data.length === 1) { if (data.length === 1) {

View File

@@ -6,20 +6,28 @@
left: 0; left: 0;
z-index: 9999; z-index: 9999;
margin-bottom: 3.2rem; margin-bottom: 3.2rem;
@screen md {
@apply relative;
}
&.full { &.full {
@apply shadow-none; @apply shadow-none;
border: 1px solid var(--border-line);
} }
.menu { .menu {
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
padding-left: 3.2rem; padding-left: 3.2rem;
padding-right: 3.2rem; padding-right: 3.2rem;
} }
.logo { .logo {
@apply font-logo; @apply font-logo;
} }
@screen md {
@apply relative;
&.full {
border: 1px solid var(--border-line);
}
.menu {
@apply shadow-none;
}
}
} }
.headerSticky { .headerSticky {

View File

@@ -1,5 +1,5 @@
import classNames from 'classnames'
import Link from 'next/link' import Link from 'next/link'
import { useRouter } from 'next/router'
import { memo, useMemo } from 'react' import { memo, useMemo } from 'react'
import InputSearch from 'src/components/common/InputSearch/InputSearch' import InputSearch from 'src/components/common/InputSearch/InputSearch'
import MenuDropdown from 'src/components/common/MenuDropdown/MenuDropdown' import MenuDropdown from 'src/components/common/MenuDropdown/MenuDropdown'
@@ -7,7 +7,6 @@ import { IconBuy, IconFilter, IconHeart, IconHistory, IconUser } from 'src/compo
import { ACCOUNT_TAB, QUERY_KEY, ROUTE } from 'src/utils/constanst.utils' import { ACCOUNT_TAB, QUERY_KEY, ROUTE } from 'src/utils/constanst.utils'
import Logo from '../../../Logo/Logo' import Logo from '../../../Logo/Logo'
import s from './HeaderMenu.module.scss' import s from './HeaderMenu.module.scss'
import { useRouter } from 'next/router'
interface Props { interface Props {
children?: any, children?: any,
openModalAuthen: () => void, openModalAuthen: () => void,
@@ -29,6 +28,10 @@ const HeaderMenu = memo(({ openModalAuthen, openModalInfo, toggleFilter, toggleC
onClick: openModalInfo, onClick: openModalInfo,
name: 'Create User Info (Demo)', name: 'Create User Info (Demo)',
}, },
{
link: ROUTE.NOTIFICATION,
name: 'Notifications',
},
{ {
link: ROUTE.ACCOUNT, link: ROUTE.ACCOUNT,
name: 'Account', name: 'Account',

View File

@@ -25,7 +25,7 @@ const OPTION_MENU = [
isMarked: false, isMarked: false,
}, },
{ {
link: `${ROUTE.ACCOUNT}?${QUERY_KEY.TAB}=${ACCOUNT_TAB.NOTIFICATION}`, link: ROUTE.NOTIFICATION,
name: 'Notifications', name: 'Notifications',
icon: <IconNoti />, icon: <IconNoti />,
isMarked: true, isMarked: true,

View File

@@ -34,7 +34,7 @@ const ScrollToTop = ({ visibilityHeight=450 }: ScrollToTopProps) => {
useEffect(() => { useEffect(() => {
addEventScroll(); addEventScroll();
}); }, []);
return ( return (
<div className={classNames(s.scrollToTop, { <div className={classNames(s.scrollToTop, {

View File

@@ -31,11 +31,15 @@
width: min-content; width: min-content;
color: var(--white); color: var(--white);
font-size: 8.8rem; font-size: 7rem;
line-height: 8rem; line-height: 8rem;
letter-spacing: -0.03em; letter-spacing: -0.03em;
font-weight: bold; font-weight: bold;
text-transform: uppercase; text-transform: uppercase;
@screen 2xl {
line-height: 8rem;
}
&::after { &::after {
@apply absolute; @apply absolute;
content: ""; content: "";

View File

@@ -21,6 +21,7 @@ export const ROUTE = {
RECIPES: '/recipes', RECIPES: '/recipes',
RECIPE_DETAIL: '/recipe', RECIPE_DETAIL: '/recipe',
NOTIFICATION: '/notification',
BUSSINESS: '/bussiness', BUSSINESS: '/bussiness',
CONTACT: '/contact', CONTACT: '/contact',
CHECKOUT: '/checkout', CHECKOUT: '/checkout',
@@ -35,7 +36,6 @@ export const ACCOUNT_TAB = {
CUSTOMER_INFO: '', CUSTOMER_INFO: '',
ORDER: 'orders', ORDER: 'orders',
FAVOURITE: 'wishlist', FAVOURITE: 'wishlist',
NOTIFICATION: 'notification',
} }
export const QUERY_KEY = { export const QUERY_KEY = {