-
);
};
diff --git a/src/pages/Dashboard.js b/src/pages/Dashboard.js
index 5d32462..4c470d8 100644
--- a/src/pages/Dashboard.js
+++ b/src/pages/Dashboard.js
@@ -17,6 +17,7 @@ const LinktreePage = ({ user, setModal }) => {
const location = useLocation();
const [lastModal, setLastModal] = useState(false);
+ const [wasInputtingPassword, setWasInputtingPassword] = useState(false);
const [inputtingPassword, setInputtingPassword] = useState(false);
const [username, setUsername] = useState('');
const [password, setPassword] = useState('');
@@ -882,7 +883,7 @@ const sortedMaterials = allMaterials.sort((a, b) => new Date(a.date) - new Date(
{getLocalStorage('auth') == null && (
-
+
new Date(a.date) - new Date(
value={username}
onChange={(e) => setUsername(e.target.value)}
/>
-
-
+
diff --git a/src/pages/Join.js b/src/pages/Join.js
index 1e20541..e219a3a 100644
--- a/src/pages/Join.js
+++ b/src/pages/Join.js
@@ -16,10 +16,10 @@ const LinktreePage = ({ data, setModal }) => {
// Detect query params on component mount
useEffect(() => {
+ if(couponCode != '') return;
const code = queryParams.get('couponCode');
console.log(code)
if (code) {
- setCouponStatus(200);
setCouponCode(code);
setIsUsingCoupon(true); // Automatically switch to the coupon input state
handleCheckCoupon(code); // Automatically check the coupon code
@@ -144,6 +144,7 @@ const LinktreePage = ({ data, setModal }) => {
period={couponDetails?.discountPeriods}
expiration={couponDetails?.expirationDate}
/>
+ {couponStatus == 200 &&
+}
>
)}
@@ -176,6 +178,7 @@ const LinktreePage = ({ data, setModal }) => {
// Remove the couponCode query parameter
url.searchParams.delete('couponCode');
+ url.searchParams.delete('codeStatus');
// Update the browser's URL, but keep 'modal=join' intact
window.history.pushState({}, '', url.toString());
diff --git a/src/pages/LinktreePage.module.css b/src/pages/LinktreePage.module.css
index 95cb719..e695c86 100644
--- a/src/pages/LinktreePage.module.css
+++ b/src/pages/LinktreePage.module.css
@@ -233,8 +233,13 @@
left: 0vw;
}
- 100% {
+ 99.9% {
left: 100vw;
+ visibility: hidden;
+ }
+ 100% {
+ left: 0vw;
+ visibility: hidden;
}
}