Skip to content

Commit

Permalink
useEffect: completely removed FRUSTRATING .focus()
Browse files Browse the repository at this point in the history
  • Loading branch information
DarrenSem authored Jul 17, 2023
1 parent 158a88a commit 32a2f47
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@
<script type="text/babel">

const EXAMPLE_DATA = ["1023", "570", "250", "180", ""]; // Pool: $2023 , Even: $480 x 4 ( = 1920 total ) + $101 CL

const FOCUS_DELAY_DEFAULT = 4;
const FOCUS_DELAY_SECONDARY = FOCUS_DELAY_DEFAULT + 50;

const LABEL_INSERT = "Insert new place at top of list";
const LABEL_INPUT = index => `Payout for ${ordinal(index + 1)} place`;
const LABEL_REMOVE = index => `Remove ${ordinal(index + 1)} place`;
const LABEL_APPEND = "Add new place to bottom of list";
const FOCUS_DELAY_DEFAULT = 4;
const FOCUS_DELAY_SECONDARY = FOCUS_DELAY_DEFAULT + 250;

const APP_KEY = "prize-pool-chop-minus-5%";

const zero_our = (_ = [
Expand Down Expand Up @@ -73,7 +76,7 @@
React.useEffect(() => {
localStorage.setItem(APP_KEY, JSON.stringify(places));
// focusIndex(places.length - 1);
focusIndex(0);
// focusIndex(0);
}, [places]);

const totalPrizePool = places
Expand Down

0 comments on commit 32a2f47

Please sign in to comment.