diff --git a/desktop/app/src/sandy-chrome/LeftRail.tsx b/desktop/app/src/sandy-chrome/LeftRail.tsx
index b90fefca4..109586c22 100644
--- a/desktop/app/src/sandy-chrome/LeftRail.tsx
+++ b/desktop/app/src/sandy-chrome/LeftRail.tsx
@@ -15,12 +15,9 @@ import {
BellOutlined,
FileExclamationOutlined,
LoginOutlined,
- BugOutlined,
SettingOutlined,
- QuestionCircleOutlined,
MedicineBoxOutlined,
RocketOutlined,
- SwapOutlined,
} from '@ant-design/icons';
import {SidebarLeft, SidebarRight} from './SandyIcons';
import {useDispatch, useStore} from '../utils/useStore';
@@ -185,12 +182,9 @@ export const LeftRail = withTrackingScope(function LeftRail({
-
-
-
-
+
{config.showLogin && }
@@ -213,7 +207,7 @@ const submenu = css`
display: none;
}
`;
-function ImportExportButton() {
+function ExtrasMenu() {
const store = useStore();
const startFileExportTracked = useTrackedCallback(
@@ -232,35 +226,84 @@ function ImportExportButton() {
[store],
);
+ const [showSettings, setShowSettings] = useState(false);
+ const onSettingsClose = useCallback(() => setShowSettings(false), []);
+
+ const settings = useStore((state) => state.settingsState);
+ const {showWelcomeAtStartup} = settings;
+ const [welcomeVisible, setWelcomeVisible] = useState(showWelcomeAtStartup);
+
return (
-
+ {showSettings && (
+
+ )}
+ setWelcomeVisible(false)}
+ showAtStartup={showWelcomeAtStartup}
+ onCheck={(value) =>
+ store.dispatch({
+ type: 'UPDATE_SETTINGS',
+ payload: {...settings, showWelcomeAtStartup: value},
+ })
+ }
+ />
+ >
);
}
@@ -381,74 +424,6 @@ function SetupDoctorButton() {
);
}
-function ShowSettingsButton() {
- const [showSettings, setShowSettings] = useState(false);
- const onClose = useCallback(() => setShowSettings(false), []);
- return (
- <>
- }
- small
- title="Settings"
- onClick={() => setShowSettings(true)}
- selected={showSettings}
- />
- {showSettings && (
-
- )}
- >
- );
-}
-
-function SupportFormButton() {
- const dispatch = useDispatch();
- const staticView = useStore((state) => state.connections.staticView);
- return config.isFBBuild ? (
- }
- small
- title="Feedback / Bug Reporter"
- selected={isStaticViewActive(staticView, SupportRequestFormV2)}
- onClick={() => {
- getLogger().track('usage', 'support-form-source', {
- source: 'sidebar',
- group: undefined,
- });
- dispatch(setStaticView(SupportRequestFormV2));
- }}
- />
- ) : null;
-}
-
-function WelcomeScreenButton() {
- const settings = useStore((state) => state.settingsState);
- const {showWelcomeAtStartup} = settings;
- const dispatch = useDispatch();
- const [visible, setVisible] = useState(showWelcomeAtStartup);
-
- return (
- <>
- }
- small
- title="Help / Start Screen"
- onClick={() => setVisible(true)}
- />
- setVisible(false)}
- showAtStartup={showWelcomeAtStartup}
- onCheck={(value) =>
- dispatch({
- type: 'UPDATE_SETTINGS',
- payload: {...settings, showWelcomeAtStartup: value},
- })
- }
- />
- >
- );
-}
-
function LoginButton() {
const dispatch = useDispatch();
const user = useStore((state) => state.user);
@@ -492,10 +467,3 @@ function LoginButton() {
>
);
}
-
-function isStaticViewActive(
- current: StaticView,
- selected: StaticView,
-): boolean {
- return Boolean(current && selected && current === selected);
-}