From f3387a3bf5cdbd7b747afe0198cce4a60a7875c0 Mon Sep 17 00:00:00 2001
From: bndw
Date: Sun, 4 Jul 2021 16:59:39 -0700
Subject: Password must be atleast 8 characters
Fixes #29
---
src/components/Card.js | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/components/Card.js b/src/components/Card.js
index 16f94a4..3394859 100644
--- a/src/components/Card.js
+++ b/src/components/Card.js
@@ -24,6 +24,14 @@ export const Card = () => {
return escaped;
};
+ const onPrint = () => {
+ if (network.password.length < 8) {
+ alert('Password must be atleast 8 characters');
+ } else {
+ window.print();
+ }
+ };
+
useEffect(() => {
const ssid = escape(network.ssid);
const password = escape(network.password);
@@ -73,7 +81,7 @@ export const Card = () => {
-
+
);
--
cgit v1.2.3