Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrookes committed Jul 5, 2024
1 parent 28ce82d commit 5baf7e9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions docs/data/material/components/progress/LinearBuffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
};
});
Expand All @@ -28,7 +28,7 @@ export default function LinearBuffer() {
};
});

React.useEffect(() => {
React.useEffect(() => {
const timer = setInterval(() => {
bufferRef.current();
}, 500);
Expand Down
12 changes: 6 additions & 6 deletions docs/data/material/components/progress/LinearBuffer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand All @@ -27,8 +27,8 @@ export default function LinearBuffer() {
}
};
});
React.useEffect(() => {

React.useEffect(() => {
const timer = setInterval(() => {
bufferRef.current();
}, 500);
Expand Down

0 comments on commit 5baf7e9

Please sign in to comment.