Skip to content

Commit

Permalink
made better
Browse files Browse the repository at this point in the history
  • Loading branch information
spidunno committed May 28, 2024
1 parent d19ab27 commit 6f5bb61
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ export default function App() {
// useEffect(() => {
// if(commandGeneratorFunction) setCommandGenerator(commandGeneratorFunction(items));
// }, [commandGenerator])
createEffect(() => {
setItems([...Array(itemCount()).keys()].sort(() => Math.random() - 0.5));
}, [itemCount()]);
// createEffect(() => {
// setItems([...Array(itemCount()).keys()].sort(() => Math.random() - 0.5));
// }, [itemCount()]);
createEffect(() => {
if (interval) clearInterval(interval);
const gen = commandGenerator();
Expand Down Expand Up @@ -277,7 +277,7 @@ export default function App() {
{/* /> */}
{sortPlaying() ? <Pause /> : <Play />}
</button>
<input type="number" value={50} onChange={(e) => setItemCount(parseInt(e.target.value))}/>
<input type="number" value={50} onChange={(e) => {setItemCount(parseInt(e.target.value)); reset()}}/>
</div>
<div
style={{
Expand Down

0 comments on commit 6f5bb61

Please sign in to comment.