Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Jan 10, 2025
1 parent 0b2906f commit b87ff49
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const postEnvironment = asyncWrapper<PostEnvironment>(async (req, res) =>

const environments = await environmentService.getEnvironmentsByAccountId(accountId);
if (environments.length >= 10) {
res.status(400).send({ error: { code: 'resource_capped', message: "Can't create more environment" } });
res.status(400).send({ error: { code: 'resource_capped', message: "Can't create more environments" } });
return;
}

Expand Down
17 changes: 11 additions & 6 deletions packages/webapp/src/components/EnvironmentPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ export const EnvironmentPicker: React.FC = () => {
return (
<Popover open={open} onOpenChange={setOpen}>
<PopoverTrigger asChild>
<Button role="combobox" variant={'select'} className="justify-between grow w-full capitalize border-grayscale-600 px-2.5">
{env}
<IconChevronDown stroke={1} size={18} />
<Button role="combobox" variant={'select'} className="justify-between grow w-full capitalize border-grayscale-600 px-2.5 whitespace-pre">
<div className="text-ellipsis overflow-hidden">{env}</div>
<IconChevronDown stroke={1} size={18} className="w-20" />
</Button>
</PopoverTrigger>
<PopoverContent
Expand All @@ -105,10 +105,15 @@ export const EnvironmentPicker: React.FC = () => {
)}
<CommandList className="max-h-[400px]">
<CommandEmpty>No environment found.</CommandEmpty>
<CommandGroup className="px-0">
<CommandGroup className="px-0 max-h-[340px] overflow-y-scroll">
{meta.environments.map((item) => (
<CommandItem key={item.name} value={item.name} className={cn('capitalize px-2.5 text-grayscale-100')} onSelect={onSelect}>
{item.name}
<CommandItem
key={item.name}
value={item.name}
className={cn('capitalize px-2.5 text-grayscale-100 overflow-hidden whitespace-pre')}
onSelect={onSelect}
>
<div className="text-ellipsis overflow-hidden">{item.name}</div>
<IconCheck className={cn('ml-auto', env === item.name ? 'opacity-100' : 'opacity-0')} size={18} />
</CommandItem>
))}
Expand Down

0 comments on commit b87ff49

Please sign in to comment.