From c18c594d0547b957731aa0bc60ad76e0d6706c86 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Wed, 26 Jan 2022 00:12:02 -0800 Subject: [PATCH] Allow user to set uncap level doesn't save to server yet --- components/UncapIndicator/index.tsx | 15 ++++++++++++--- components/UncapStar/index.scss | 6 +++++- components/UncapStar/index.tsx | 9 +++++++++ 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/components/UncapIndicator/index.tsx b/components/UncapIndicator/index.tsx index ef8c00ab..ae10bd71 100644 --- a/components/UncapIndicator/index.tsx +++ b/components/UncapIndicator/index.tsx @@ -15,6 +15,8 @@ interface Props { const UncapIndicator = (props: Props) => { let numStars + const [uncap, setUncap] = useState(props.uncapLevel) + if (props.type === 'character') { if (props.flb) { numStars = 5 @@ -31,18 +33,25 @@ const UncapIndicator = (props: Props) => { } } + function toggleStar(index: number, empty: boolean) { + if (empty) + setUncap(index + 1) + else + setUncap(index) + } + return (