Skip to content

Commit 64fec9d

Browse files
chore: Remove Visual Refresh toggle
1 parent b8815cf commit 64fec9d

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

pages/app/components/theme-switcher.tsx

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,15 @@ import React, { useContext } from 'react';
44

55
import { Density, Mode } from '@cloudscape-design/global-styles';
66

7-
import { ALWAYS_VISUAL_REFRESH } from '~components/internal/environment';
87
import SpaceBetween from '~components/space-between';
98

109
import AppContext from '../app-context';
1110

1211
export default function ThemeSwitcher() {
1312
const { mode, urlParams, setUrlParams, setMode } = useContext(AppContext);
1413

15-
const vrSwitchProps: React.InputHTMLAttributes<HTMLInputElement> = {
16-
id: 'visual-refresh-toggle',
17-
type: 'checkbox',
18-
};
19-
20-
if (ALWAYS_VISUAL_REFRESH) {
21-
vrSwitchProps.checked = true;
22-
vrSwitchProps.readOnly = true;
23-
} else {
24-
vrSwitchProps.checked = urlParams.visualRefresh;
25-
vrSwitchProps.onChange = event => {
26-
setUrlParams({ visualRefresh: event.target.checked });
27-
window.location.reload();
28-
};
29-
}
30-
3114
return (
3215
<SpaceBetween direction="horizontal" size="xs">
33-
<label>
34-
<input {...vrSwitchProps} />
35-
Visual refresh
36-
</label>
3716
<label>
3817
<input
3918
id="mode-toggle"

0 commit comments

Comments
 (0)