diff --git a/src/components/profile-item.tsx b/src/components/profile-item.tsx index 4127c92..7f22de6 100644 --- a/src/components/profile-item.tsx +++ b/src/components/profile-item.tsx @@ -121,6 +121,19 @@ const ProfileItem: React.FC = (props) => { justifyContent: "space-between", }; + const urlModeMenu = [ + { label: "Select", handler: onForceSelect }, + { label: "View", handler: onView }, + { label: "Update", handler: onUpdateWrapper(false) }, + { label: "Update(Proxy)", handler: onUpdateWrapper(true) }, + { label: "Delete", handler: onDelete }, + ]; + const fileModeMenu = [ + { label: "Select", handler: onForceSelect }, + { label: "Edit", handler: onView }, + { label: "Delete", handler: onDelete }, + ]; + return ( <> = (props) => { anchorPosition={position} anchorReference="anchorPosition" > - Select - {isUrlMode ? ( - <> - View - Update - Update(Proxy) - - ) : ( - Edit - )} - Delete + {(isUrlMode ? urlModeMenu : fileModeMenu).map((item) => ( + + {item.label} + + ))} );