Repository: appsmithorg/appsmith
File: app/client/src/pages/Editor/IDE/EditorTabs/ScreenModeToggle.tsx (TypeScript)

Code before:
      FEATURE_FLAG.release_ide_animations_enabled,
    );
  });

  const switchToFullScreen = useCallback(() => {
    AnalyticsUtil.logEvent("EDITOR_MODE_CHANGE", {
      to: EditorViewMode.FullScreen,
    });

    // Animating using https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API
    // this has limited availability right now
    if ("startViewTransition" in document && isAnimatedIDEEnabled) {
      document.startViewTransition(() => {
        dispatch(setIdeEditorViewMode(EditorViewMode.FullScreen));
      });
    } else {
      dispatch(setIdeEditorViewMode(EditorViewMode.FullScreen));
    }
  }, [dispatch, isAnimatedIDEEnabled]);

  const switchToSplitScreen = useCallback(() => {
    AnalyticsUtil.logEvent("EDITOR_MODE_CHANGE", {
      to: EditorViewMode.SplitScreen,
    });

    dismissNudge?.();

    if ("startViewTransition" in document && isAnimatedIDEEnabled) {
      document.startViewTransition(() => {
        dispatch(setIdeEditorViewMode(EditorViewMode.SplitScreen));
      });
    } else {
      dispatch(setIdeEditorViewMode(EditorViewMode.SplitScreen));
    }
  }, [dispatch, dismissNudge, isAnimatedIDEEnabled]);

  const minimiseButton = useMemo(
    () => (
      <Button
        className="ml-auto !min-w-[24px]"
        data-testid={"t--ide-minimize"}
        id={"editor-mode-minimize"}
        isIconButton
        kind="tertiary"
        onClick={switchToSplitScreen}
        startIcon={"minimize-v3"}
      />
    ),
    [switchToSplitScreen],
  );


Review comment (suggestion):
```suggestion
    if(dismissNudge) dismissNudge()
```

Code after:
      FEATURE_FLAG.release_ide_animations_enabled,
    );
  });

  const switchToFullScreen = useCallback(() => {
    AnalyticsUtil.logEvent("EDITOR_MODE_CHANGE", {
      to: EditorViewMode.FullScreen,
    });

    // Animating using https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API
    // this has limited availability right now
    if ("startViewTransition" in document && isAnimatedIDEEnabled) {
      document.startViewTransition(() => {
        dispatch(setIdeEditorViewMode(EditorViewMode.FullScreen));
      });
    } else {
      dispatch(setIdeEditorViewMode(EditorViewMode.FullScreen));
    }
  }, [dispatch, isAnimatedIDEEnabled]);

  const switchToSplitScreen = useCallback(() => {
    AnalyticsUtil.logEvent("EDITOR_MODE_CHANGE", {
      to: EditorViewMode.SplitScreen,
    });

    if (dismissNudge) {
      dismissNudge();
    }

    if ("startViewTransition" in document && isAnimatedIDEEnabled) {
      document.startViewTransition(() => {
        dispatch(setIdeEditorViewMode(EditorViewMode.SplitScreen));
      });
    } else {
      dispatch(setIdeEditorViewMode(EditorViewMode.SplitScreen));
    }
  }, [dispatch, dismissNudge, isAnimatedIDEEnabled]);

  const minimiseButton = useMemo(
    () => (
      <Button
        className="ml-auto !min-w-[24px]"
        data-testid={"t--ide-minimize"}
        id={"editor-mode-minimize"}
        isIconButton
        kind="tertiary"
        onClick={switchToSplitScreen}
        startIcon={"minimize-v3"}
      />
    ),
    [switchToSplitScreen],