sticky fixed

This commit is contained in:
Sergey Yarkov 2020-07-17 02:17:57 +03:00
parent f6ea35edbb
commit 12d9490e46

View File

@ -4,8 +4,8 @@ import { useLocation } from '@reach/router'
const Subscription = () => { const Subscription = () => {
const { pathname } = useLocation() const { pathname } = useLocation()
return ( return (
<div style={pathname !== '/about' ? { height: '100%' } : null}> <div style={pathname !== '/about' && pathname !== '/about/' ? { height: '100%' } : null}>
<div style={pathname !== '/about' ? { position: 'sticky', top: 75 } : null} className="offers-subscription offer-box"> <div style={pathname !== '/about' && pathname !== '/about/' ? { position: 'sticky', top: 75 } : null} className="offers-subscription offer-box">
<div className="offers-subscription__heading offer-heading"> <div className="offers-subscription__heading offer-heading">
Читайте нас в Telegram Читайте нас в Telegram
</div> </div>