Skip to content

Commit

Permalink
chore: Fix missing changes in revert #34313
Browse files Browse the repository at this point in the history
  • Loading branch information
ashit-rath committed Jun 21, 2024
1 parent 979f44b commit a252566
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/client/src/pages/Editor/EditorName/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ import { SavingState } from "design-system-old";
import EditableName from "./EditableName";
import { NavigationMenu } from "./NavigationMenu";
import { Menu, toast, MenuTrigger } from "design-system";
import type { Theme } from "constants/DefaultTheme";
import ForkApplicationModal from "pages/Applications/ForkApplicationModal";
import { Container, StyledIcon } from "./components";
import { useSelector } from "react-redux";
import { getCurrentApplicationId } from "selectors/editorSelectors";
import type { NavigationMenuDataProps } from "./useNavigationMenuData";
import type { MenuItemData } from "./NavigationMenuItem";
import { useTheme } from "styled-components";

type EditorNameProps = CommonComponentProps & {
applicationId?: string | undefined;
Expand Down Expand Up @@ -49,6 +51,8 @@ export function EditorName(props: EditorNameProps) {
setIsPopoverOpen,
} = props;

const theme = useTheme() as Theme;

const [isEditingDefault, setIsEditingDefault] = useState(isNewEditor);
const [isEditing, setIsEditing] = useState(!!isEditingDefault);
const [isInvalid, setIsInvalid] = useState<string | boolean>(false);
Expand Down Expand Up @@ -100,6 +104,7 @@ export function EditorName(props: EditorNameProps) {

const navigationMenuData = getNavigationMenu({
editMode,
theme,
setForkApplicationModalOpen,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ import {
import { getCurrentApplication } from "@appsmith/selectors/applicationSelectors";
import { Colors } from "constants/Colors";
import { getCurrentApplicationId } from "selectors/editorSelectors";
import type { ThemeProp } from "WidgetProvider/constants";
import { toast } from "design-system";
import { DOCS_BASE_URL } from "constants/ThirdPartyConstants";
import { getAppsmithConfigs } from "@appsmith/configs";
import { getCurrentUser } from "selectors/usersSelectors";

const { cloudHosting, intercomAppID } = getAppsmithConfigs();

export interface NavigationMenuDataProps {
export interface NavigationMenuDataProps extends ThemeProp {
editMode: typeof noop;
setForkApplicationModalOpen: React.Dispatch<React.SetStateAction<boolean>>;
}
Expand Down

0 comments on commit a252566

Please sign in to comment.