From 5baf7e93df942e67c716365ebeaf8b0a152f5c90 Mon Sep 17 00:00:00 2001 From: Matt Date: Fri, 5 Jul 2024 20:39:38 +0100 Subject: [PATCH] prettier --- .../material/components/progress/LinearBuffer.js | 6 +++--- .../material/components/progress/LinearBuffer.tsx | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/data/material/components/progress/LinearBuffer.js b/docs/data/material/components/progress/LinearBuffer.js index e5ddb1939b694a..288fa120affdcb 100644 --- a/docs/data/material/components/progress/LinearBuffer.js +++ b/docs/data/material/components/progress/LinearBuffer.js @@ -10,8 +10,8 @@ export default function LinearBuffer() { React.useEffect(() => { bufferRef.current = () => { if (buffer < 100) { - const newBuffer = buffer + 1 + Math.random() * 10; - setBuffer(newBuffer > 100 ? 100 : newBuffer); + const newBuffer = buffer + 1 + Math.random() * 10; + setBuffer(newBuffer > 100 ? 100 : newBuffer); } }; }); @@ -28,7 +28,7 @@ export default function LinearBuffer() { }; }); - React.useEffect(() => { + React.useEffect(() => { const timer = setInterval(() => { bufferRef.current(); }, 500); diff --git a/docs/data/material/components/progress/LinearBuffer.tsx b/docs/data/material/components/progress/LinearBuffer.tsx index d0146de519809a..288fa120affdcb 100644 --- a/docs/data/material/components/progress/LinearBuffer.tsx +++ b/docs/data/material/components/progress/LinearBuffer.tsx @@ -6,16 +6,16 @@ export default function LinearBuffer() { const [progress, setProgress] = React.useState(0); const [buffer, setBuffer] = React.useState(10); - const bufferRef = React.useRef(() => {}); + const bufferRef = React.useRef(() => {}); React.useEffect(() => { bufferRef.current = () => { if (buffer < 100) { - const newBuffer = buffer + 1 + Math.random() * 10; - setBuffer(newBuffer > 100 ? 100 : newBuffer); + const newBuffer = buffer + 1 + Math.random() * 10; + setBuffer(newBuffer > 100 ? 100 : newBuffer); } }; }); - + const progressRef = React.useRef(() => {}); React.useEffect(() => { progressRef.current = () => { @@ -27,8 +27,8 @@ export default function LinearBuffer() { } }; }); - - React.useEffect(() => { + + React.useEffect(() => { const timer = setInterval(() => { bufferRef.current(); }, 500);