Skip to content

Commit

Permalink
fix: made changes suggested by coderabbitai
Browse files Browse the repository at this point in the history
  • Loading branch information
saiprabhu-dandanayak committed Jun 28, 2024
1 parent c245a31 commit 60ea5a4
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/client/src/ce/constants/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1712,7 +1712,7 @@ export const END_DESCRIPTION = () =>
"Inspect properties of queries, components, etc.";
export const END_BUTTON_TEXT = () => "Start building an app";

export const CONTEXT_RE_NAME = () => "Rename";
export const CONTEXT_RENAME = () => "Rename";
export const CONTEXT_SHOW_BINDING = () => "Show bindings";
export const CONTEXT_MOVE = () => "Move to page";
export const CONTEXT_COPY = () => "Copy to page";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
CONTEXT_COPY,
CONTEXT_DELETE,
CONFIRM_CONTEXT_DELETE,
CONTEXT_RE_NAME,
CONTEXT_RENAME,
CONTEXT_MOVE,
CONTEXT_NO_PAGE,
CONTEXT_SHOW_BINDING,
Expand Down Expand Up @@ -110,7 +110,7 @@ export function ActionEntityContextMenu(props: EntityContextMenuProps) {
canManageAction && {
value: "rename",
onSelect: editActionName,
label: createMessage(CONTEXT_RE_NAME),
label: createMessage(CONTEXT_RENAME),
},
menuItems.includes(ActionEntityContextMenuItemsEnum.SHOW_BINDING) && {
value: "showBinding",
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/pages/Editor/Explorer/ContextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function TreeDropdown(props: TreeDropdownProps) {
// Without this the input takes focus first post which the Menu closes post which MenuTrigger
// takes back focus.
setTimeout(() => {
option.onSelect && option.onSelect(option);
option.onSelect?.(option);
}, 0);
if (option.value === "delete" && !option.confirmDelete) {
handleOpenChange(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useDispatch, useSelector } from "react-redux";
import { deleteDatasource } from "actions/datasourceActions";
import { initExplorerEntityNameEdit } from "actions/explorerActions";
import {
CONTEXT_RE_NAME,
CONTEXT_RENAME,
CONTEXT_DELETE,
CONFIRM_CONTEXT_DELETE,
createMessage,
Expand Down Expand Up @@ -59,7 +59,7 @@ export function DataSourceContextMenu(props: {
value: "rename",
className: "single-select t--datasource-rename",
onSelect: editDatasourceName,
label: createMessage(CONTEXT_RE_NAME),
label: createMessage(CONTEXT_RENAME),
},
canDeleteDatasource && {
confirmDelete: confirmDelete,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
CONTEXT_COPY,
CONTEXT_DELETE,
CONFIRM_CONTEXT_DELETE,
CONTEXT_RE_NAME,
CONTEXT_RENAME,
CONTEXT_MOVE,
CONTEXT_NO_PAGE,
CONTEXT_SHOW_BINDING,
Expand Down Expand Up @@ -100,7 +100,7 @@ export function JSCollectionEntityContextMenu(props: EntityContextMenuProps) {
canManage && {
value: "rename",
onSelect: editJSCollectionName,
label: createMessage(CONTEXT_RE_NAME),
label: createMessage(CONTEXT_RENAME),
},
menuItems.includes(ActionEntityContextMenuItemsEnum.SHOW_BINDING) && {
value: "showBinding",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import styled from "styled-components";
import { Icon } from "design-system";
import {
CONTEXT_RE_NAME,
CONTEXT_RENAME,
CONTEXT_CLONE,
CONTEXT_SET_AS_HOME_PAGE,
CONTEXT_DELETE,
Expand Down Expand Up @@ -156,7 +156,7 @@ export function PageContextMenu(props: {
canManagePages && {
value: "rename",
onSelect: editPageName,
label: createMessage(CONTEXT_RE_NAME),
label: createMessage(CONTEXT_RENAME),
},
canCreatePages &&
canManagePages && {
Expand Down

0 comments on commit 60ea5a4

Please sign in to comment.