From e522e3e861e5a7bdac5266440a7ab34e80d340a9 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Mon, 29 Sep 2025 22:31:01 +0700 Subject: [PATCH] :technologist: (dev) merge open signup dan login popup button --- widgets/navbar/ui/LoginAndSignup.tsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/widgets/navbar/ui/LoginAndSignup.tsx b/widgets/navbar/ui/LoginAndSignup.tsx index 06a5889..617c50b 100644 --- a/widgets/navbar/ui/LoginAndSignup.tsx +++ b/widgets/navbar/ui/LoginAndSignup.tsx @@ -5,11 +5,8 @@ import { Button, Link, NavbarItem } from "@heroui/react"; import React from "react"; const LoginAndSignup = () => { - const openLoginPopup = (e: any) => { - window.open(routes.login, "popup", "width=500,height=600"); - }; - const openSignupPopup = (e: any) => { - window.open(routes.signup, "popup", "width=500,height=600"); + const openPopupWindow = (href: string) => { + window.open(href, "popup", "width=500,height=600"); }; return ( <> @@ -18,7 +15,7 @@ const LoginAndSignup = () => { color="primary" variant="light" className="font-medium" - onPress={openLoginPopup} + onPress={() => openPopupWindow(routes.login)} > Login @@ -28,7 +25,7 @@ const LoginAndSignup = () => { color="primary" variant="solid" radius="sm" - onPress={openSignupPopup} + onPress={() => openPopupWindow(routes.signup)} > Sign Up