From f2c873eb373ac71f691edd7cf6d03c08221f2bec Mon Sep 17 00:00:00 2001 From: koko37 Date: Tue, 29 Oct 2024 13:43:16 +0800 Subject: [PATCH] update greetings while sign-in --- src/lib/conf.js | 9 +++++++++ src/pages/Signin/index.jsx | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/lib/conf.js b/src/lib/conf.js index 7a61965..07960e1 100644 --- a/src/lib/conf.js +++ b/src/lib/conf.js @@ -127,3 +127,12 @@ export const REFRESH_STATUS_DURATION = 15_000; // The hidden balances will be displayed as shown below export const BALANCE_PLACEHOLDER = "*****"; export const LOADING_PLACEHOLDER = "-----"; + +export const UNKNOWN_FACTS = [ + "🌟 Brute-forcing takes millions of years!", + "🔐 It runs only in your browser. Your password stays safe!", + "📂 We never store or transmit your password.", + "🤫 Your account's origin remains anonymous.", + "💼 Feel free to transfer your wallet anytime.", + "⚠️ Don't forget your password! There's no reset or recovery option.", +]; diff --git a/src/pages/Signin/index.jsx b/src/pages/Signin/index.jsx index 3fb8e55..d2e3876 100644 --- a/src/pages/Signin/index.jsx +++ b/src/pages/Signin/index.jsx @@ -19,6 +19,7 @@ import { PASSCODE_MIN_LENGTH, PASSWORD_MAX_LENGTH, PASSWORD_MIN_LENGTH, + UNKNOWN_FACTS, } from "@mybucks/lib/conf"; import media from "@mybucks/styles/media"; @@ -179,6 +180,11 @@ const SignIn = () => { [[password, passwordConfirm, passcode, disabled]] ); + const unknownFact = useMemo( + () => UNKNOWN_FACTS[Math.floor(Math.random() * UNKNOWN_FACTS.length)], + [] + ); + const onSubmit = async () => { setDisabled(true); try { @@ -303,7 +309,7 @@ const SignIn = () => { mybucks.online - Hang on, it takes millions of years to brute force! + {unknownFact}