Skip to content

Commit

Permalink
[core] Remove window. reference for common globals
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Feb 23, 2024
1 parent b16289b commit e49570c
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/data/joy/components/input/DebouncedInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function DebounceInput(props) {
clearTimeout(timerRef.current);
}

timerRef.current = window.setTimeout(() => {
timerRef.current = setTimeout(() => {
handleDebounce(event.target.value);
}, debounceTimeout);
};
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/input/DebouncedInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function DebounceInput(props: InputProps & DebounceProps) {
clearTimeout(timerRef.current);
}

timerRef.current = window.setTimeout(() => {
timerRef.current = setTimeout(() => {
handleDebounce(event.target.value);
}, debounceTimeout);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function CircularIntegration() {
if (!loading) {
setSuccess(false);
setLoading(true);
timer.current = window.setTimeout(() => {
timer.current = setTimeout(() => {
setSuccess(true);
setLoading(false);
}, 2000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function CircularIntegration() {
if (!loading) {
setSuccess(false);
setLoading(true);
timer.current = window.setTimeout(() => {
timer.current = setTimeout(() => {
setSuccess(true);
setLoading(false);
}, 2000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function DelayingAppearance() {
}

setQuery('progress');
timerRef.current = window.setTimeout(() => {
timerRef.current = setTimeout(() => {
setQuery('success');
}, 2000);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function DelayingAppearance() {
}

setQuery('progress');
timerRef.current = window.setTimeout(() => {
timerRef.current = setTimeout(() => {
setQuery('success');
}, 2000);
};
Expand Down
2 changes: 1 addition & 1 deletion examples/material-ui-remix-ts/app/entry.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ if (window.requestIdleCallback) {
} else {
// Safari doesn't support requestIdleCallback
// https://caniuse.com/requestidlecallback
window.setTimeout(hydrate, 1);
setTimeout(hydrate, 1);
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function LazyRoute() {
if (!isDone) {
// Force React to show fallback suspense
throw new Promise((resolve) => {
window.setTimeout(resolve, 1);
setTimeout(resolve, 1);
setIsDone(true);
});
}
Expand Down

0 comments on commit e49570c

Please sign in to comment.