diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/components/elements/Footer/BasicFooter.jsx | 12 | ||||
| -rw-r--r-- | src/core/components/elements/Navbar/NavbarDesktop.jsx | 32 | ||||
| -rw-r--r-- | src/core/components/layouts/BasicLayout.jsx | 5 | ||||
| -rw-r--r-- | src/core/utils/whatsappUrl.js | 4 |
4 files changed, 42 insertions, 11 deletions
diff --git a/src/core/components/elements/Footer/BasicFooter.jsx b/src/core/components/elements/Footer/BasicFooter.jsx index 9f68c2f7..23bca677 100644 --- a/src/core/components/elements/Footer/BasicFooter.jsx +++ b/src/core/components/elements/Footer/BasicFooter.jsx @@ -83,7 +83,8 @@ const OfficeLocation = () => ( <div> <div className={headerClassName}>Kantor Pusat</div> <div className='leading-6 text-gray_r-12/80'> - Jl. Bandengan Utara 85A No. 8-9 RT.3/RW.16, Penjaringan, Kec. Penjaringan, Jakarta Utara + <a href='https://goo.gl/maps/3DCJxtki8jUV32pR7' target='_blank' rel='noreferrer' className='text-gray_r-12/80'> + Jl. Bandengan Utara 85A No. 8-9 RT.3/RW.16, Penjaringan, Kec. Penjaringan, Jakarta Utara</a> </div> </div> ) @@ -186,11 +187,11 @@ const InformationCenter = () => ( <ul className='flex flex-col gap-y-3'> <li className='text-gray_r-12/80 flex items-center'> <PhoneArrowUpRightIcon className='w-[18px] mr-2' /> - <a href='tel:02129338828'>(021) 2933-8828 / 29</a> + <a href='tel:02129338828' target='_blank' rel='noreferrer'>(021) 2933-8828 / 29</a> </li> <li className='text-gray_r-12/80 flex items-center'> <EnvelopeIcon className='w-[18px] mr-2' /> - <a href='mailto:sales@indoteknik.com'>sales@indoteknik.com</a> + <a href='mailto:sales@indoteknik.com' target='_blank' rel='noreferrer'>sales@indoteknik.com</a> </li> <li className='text-gray_r-12/80 flex items-center'> <DevicePhoneMobileIcon className='w-[18px] mr-2' /> @@ -239,6 +240,9 @@ const SocialMedias = () => ( <a target='_blank' rel='noreferrer' href='https://www.linkedin.com/company/pt-indoteknik-dotcom-gemilang/'> <NextImage src='/images/socials/Linkedin.png' alt='Linkedin Logo' width={24} height={24} /> </a> + <a target='_blank' rel='noreferrer' href='https://goo.gl/maps/GF8EmDjpQTHZPsJ1A'> + <NextImage src='/images/socials/g_maps.png' alt='Linkedin Logo' width={24} height={24} /> + </a> </div> </div> ) @@ -275,7 +279,7 @@ const Payments = () => ( ) const InternalItemLink = ({ href, children }) => ( - <Link href={href} className='!text-gray_r-12/80 font-normal line-clamp-1'> + <Link href={href} className='!text-gray_r-12/80 font-normal line-clamp-1' target="_blank" rel="noopener noreferrer"> {children} </Link> ) diff --git a/src/core/components/elements/Navbar/NavbarDesktop.jsx b/src/core/components/elements/Navbar/NavbarDesktop.jsx index 6fdea644..655c4732 100644 --- a/src/core/components/elements/Navbar/NavbarDesktop.jsx +++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx @@ -37,6 +37,7 @@ const NavbarDesktop = () => { const [templateWA, setTemplateWA] = useState(null) const [payloadWA, setPayloadWa] = useState(null) + const [urlPath, setUrlPath] = useState(null) const router = useRouter() @@ -65,6 +66,8 @@ const NavbarDesktop = () => { } getProduct() setTemplateWA('product') + + setUrlPath(router.asPath) } return () => { @@ -100,13 +103,23 @@ const NavbarDesktop = () => { <Search /> </div> <div className='flex gap-x-4'> - <Link href='/my/transactions' className='flex items-center gap-x-2 !text-gray_r-12/80'> + <Link + href='/my/transactions' + target='_blank' + rel='noreferrer' + className='flex items-center gap-x-2 !text-gray_r-12/80' + > <DocumentCheckIcon className='w-7' /> Daftar <br /> Quotation </Link> - <Link href='/shop/cart' className='flex items-center gap-x-2 !text-gray_r-12/80'> + <Link + href='/shop/cart' + target='_blank' + rel='noreferrer' + className='flex items-center gap-x-2 !text-gray_r-12/80' + > <div className={`relative ${cartCount > 0 && 'mr-2'}`}> <ShoppingCartIcon className='w-7' /> {cartCount > 0 && ( @@ -121,12 +134,17 @@ const NavbarDesktop = () => { Belanja </span> </Link> - <Link href='/my/wishlist' className='flex items-center gap-x-2 !text-gray_r-12/80'> + <Link + target='_blank' + rel='noreferrer' + href='/my/wishlist' + className='flex items-center gap-x-2 !text-gray_r-12/80' + > <HeartIcon className='w-7' /> Wishlist </Link> <a - href={whatsappUrl(templateWA, payloadWA)} + href={whatsappUrl(templateWA, payloadWA, urlPath)} target='_blank' rel='noreferrer' className='flex items-center gap-x-1 !text-gray_r-12/80' @@ -158,12 +176,16 @@ const NavbarDesktop = () => { <Link href='/shop/brands' className='p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition' + target='_blank' + rel='noreferrer' > Semua Brand </Link> <Link href='/shop/search?orderBy=stock' className='p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition' + target='_blank' + rel='noreferrer' > Ready Stock </Link> @@ -178,6 +200,8 @@ const NavbarDesktop = () => { <Link href='/video' className='p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition' + target='_blank' + rel='noreferrer' > Indoteknik TV </Link> diff --git a/src/core/components/layouts/BasicLayout.jsx b/src/core/components/layouts/BasicLayout.jsx index e737101a..266223d8 100644 --- a/src/core/components/layouts/BasicLayout.jsx +++ b/src/core/components/layouts/BasicLayout.jsx @@ -18,6 +18,7 @@ const AnimationLayout = dynamic(() => import('./AnimationLayout')) const BasicLayout = ({ children }) => { const [templateWA, setTemplateWA] = useState(null) const [payloadWA, setPayloadWa] = useState(null) + const [urlPath, setUrlPath] = useState(null) const router = useRouter() @@ -46,6 +47,8 @@ const BasicLayout = ({ children }) => { } getProduct() setTemplateWA('product') + + setUrlPath(router.asPath) } }, []) return ( @@ -55,7 +58,7 @@ const BasicLayout = ({ children }) => { {children} <div className='fixed bottom-4 right-4 sm:bottom-14 sm:right-10 z-50'> <a - href={whatsappUrl(templateWA, payloadWA)} + href={whatsappUrl(templateWA, payloadWA, urlPath)} className='py-2 pl-3 pr-4 rounded-full bg-[#4FB84A] border border-green-300 flex items-center' rel='noopener noreferrer' target='_blank' diff --git a/src/core/utils/whatsappUrl.js b/src/core/utils/whatsappUrl.js index c5959ed6..6c354924 100644 --- a/src/core/utils/whatsappUrl.js +++ b/src/core/utils/whatsappUrl.js @@ -1,9 +1,9 @@ import { getAuth } from "./auth" -const whatsappUrl = (template = 'default', payload) => { +const whatsappUrl = (template = 'default', payload, urlPath = '') => { let user = getAuth() if(!user){ - return '/login' + return `/login?next=${urlPath}` } let parentName = user.parentName || '-' let url = 'https://wa.me/628128080622' |
