From b10b81eac23a4c8efb7ab9df98c042203eef87fa Mon Sep 17 00:00:00 2001 From: Adrian Dmitra Date: Sun, 30 Jul 2023 17:59:16 -0600 Subject: [PATCH] fix console errors - no "==" operator - no javascript in href - no "div" tags nested in "p" - replace "value" prop with "checked" for Form.Checkbox component --- webclient/src/Admin.js | 2 +- webclient/src/AdminMembers.js | 40 +++++++++++++++++------------------ webclient/src/Classes.js | 4 ++-- webclient/src/Home.js | 2 +- webclient/src/Members.js | 2 +- webclient/src/Paymaster.js | 13 +++++------- webclient/src/light.css | 4 ++++ 7 files changed, 34 insertions(+), 33 deletions(-) diff --git a/webclient/src/Admin.js b/webclient/src/Admin.js index 6e49096..4454ac2 100644 --- a/webclient/src/Admin.js +++ b/webclient/src/Admin.js @@ -171,7 +171,7 @@ export function AdminHistory(props) { - setFocus(x.id)}> + setFocus(x.id)}> {moment.utc(x.history_date).tz('America/Edmonton').format('YYYY-MM-DD')} diff --git a/webclient/src/AdminMembers.js b/webclient/src/AdminMembers.js index da07a30..4b6d85d 100644 --- a/webclient/src/AdminMembers.js +++ b/webclient/src/AdminMembers.js @@ -330,7 +330,7 @@ export function AdminMemberPause(props) {
Pause / Unpause Membership
-

+

{result.member.paused_date ? result.member.vetted_date && moment().diff(moment(result.member.paused_date), 'days') > 370 ? <> @@ -338,16 +338,16 @@ export function AdminMemberPause(props) { {result.member.preferred_name} has been away for more than a year and will need to be re-vetted according to our policy.

-

+

setTold1(v.checked)} /> -

-

+

+
setTold2(v.checked)} /> -

+
: - result.member.status == 'Expired Member' ? + result.member.status === 'Expired Member' ? <>

{result.member.preferred_name} has expired due to lapse of payment.

-

+

setTold1(v.checked)} /> -

-

+

+
setTold2(v.checked)} /> -

+
} -

+
{success &&
Success!
} {error &&

Error, something went wrong.

} diff --git a/webclient/src/Classes.js b/webclient/src/Classes.js index 9af7649..4aa6e78 100644 --- a/webclient/src/Classes.js +++ b/webclient/src/Classes.js @@ -354,7 +354,7 @@ export function Classes(props) { } -

+

Filter by tag:

diff --git a/webclient/src/Home.js b/webclient/src/Home.js index 33593a8..27d8ffe 100644 --- a/webclient/src/Home.js +++ b/webclient/src/Home.js @@ -63,7 +63,7 @@ function MemberInfo(props) { Shelf: {user.storage.length ? - user.storage.sort((a, b) => a.location == 'member_shelves' ? -1 : 1).map((x, i) => + user.storage.sort((a, b) => a.location === 'member_shelves' ? -1 : 1).map((x, i) => ) : diff --git a/webclient/src/Members.js b/webclient/src/Members.js index 03cb6ad..08b3a6e 100644 --- a/webclient/src/Members.js +++ b/webclient/src/Members.js @@ -201,7 +201,7 @@ export function Members(props) { Sort by{' '} {Object.entries(memberSorts).map((x, i) => - doSort(x[0])}>{x[1]} + doSort(x[0])}>{x[1]} {i < Object.keys(memberSorts).length - 1 && ', '} )}. diff --git a/webclient/src/Paymaster.js b/webclient/src/Paymaster.js index 2b9dbbc..0fee09b 100644 --- a/webclient/src/Paymaster.js +++ b/webclient/src/Paymaster.js @@ -114,7 +114,6 @@ export function SendProtocoin(props) { export function Paymaster(props) { const { token, user, refreshUser } = props; - const [pop, setPop] = useState('20.00'); const [locker, setLocker] = useState('5.00'); const [consumables, setConsumables] = useState(''); const [buyProtocoin, setBuyProtocoin] = useState('10.00'); @@ -214,14 +213,14 @@ export function Paymaster(props) { />
-

+

Please explain what you bought:
setConsumablesMemo(v.value)} /> -

+
-

- -

+

Optional memo:
setMemo(v.value)} /> -

+
); -}; +}; \ No newline at end of file diff --git a/webclient/src/light.css b/webclient/src/light.css index 62fde90..94ca817 100644 --- a/webclient/src/light.css +++ b/webclient/src/light.css @@ -17,6 +17,10 @@ body { margin: 0; } +a { + cursor: pointer; +} + .hero { padding-top: 1.5rem; margin-bottom: 1.5rem;