diff --git a/src-web/components/EnvironmentActionsDropdown.tsx b/src-web/components/EnvironmentActionsDropdown.tsx index 54423c2b..f79a26c7 100644 --- a/src-web/components/EnvironmentActionsDropdown.tsx +++ b/src-web/components/EnvironmentActionsDropdown.tsx @@ -34,11 +34,12 @@ export const EnvironmentActionsDropdown = memo(function EnvironmentActionsDropdo (e) => ({ key: e.id, label: e.name, + rightSlot: e.id === activeEnvironment?.id ? : undefined, onSelect: async () => { routes.setEnvironment(e); }, }), - [], + [activeEnvironment?.id], ); const activeEnvironmentItems: DropdownItem[] = environments.length <= 1 @@ -99,7 +100,7 @@ export const EnvironmentActionsDropdown = memo(function EnvironmentActionsDropdo const name = await prompt({ name: 'name', label: 'Name', - defaultValue: '', + defaultValue: 'My Environment', description: 'Enter a name for the new environment', title: 'Create Environment', }); diff --git a/src-web/components/Sidebar.tsx b/src-web/components/Sidebar.tsx index b2a8062a..bc71621a 100644 --- a/src-web/components/Sidebar.tsx +++ b/src-web/components/Sidebar.tsx @@ -51,7 +51,7 @@ export const Sidebar = memo(function Sidebar({ className }: Props) { const [selectedIndex, setSelectedIndex] = useState(); // TODO: Move these listeners to a central place - useListenToTauriEvent('create_request', async () => createRequest.mutate({})); + useListenToTauriEvent('new_request', async () => createRequest.mutate({})); const focusActiveRequest = useCallback( (forcedIndex?: number) => {