Skip to content

Commit

Permalink
chore(): reverse contrib list and add field req (#2509)
Browse files Browse the repository at this point in the history
  • Loading branch information
quininez authored Dec 7, 2024
1 parent d75687d commit ba4f32a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const ExtensionEditContributorsPage: React.FC<ExtensionEditContributorsPa
const handleAddContributor = (profile: AkashaProfile) => {
if (addedContributors?.length < MAX_CONTRIBUTORS) {
setAddedContributors(prev => {
const res = Array.from(new Set([...prev, profile]));
const res = Array.from(new Set([profile, ...prev]));
return res;
});
setSearchValue('');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ const ExtensionEditStep2Form: React.FC<ExtensionEditStep2FormProps> = props => {
status={error?.message ? 'error' : null}
inputRef={ref}
type="multiline"
required={true}
/>
)}
defaultValue={defaultValues.description}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { ExclamationTriangleIcon } from '@heroicons/react/24/solid';
import { PlusIcon } from '@heroicons/react/24/outline';
import { ApolloError } from '@apollo/client';
import ErrorLoader from '@akashaorg/design-system-core/lib/components/ErrorLoader';
import Label from '@akashaorg/design-system-core/lib/components/Label';

const MAX_TAGS = 4;

Expand Down Expand Up @@ -271,7 +272,7 @@ const ExtensionEditStep3Form: React.FC<ExtensionEditStep3FormProps> = props => {
<Divider />

<Stack direction="column" spacing="gap-2">
<Text variant="h6">{tagsLabel}</Text>
<Label required={true}>{tagsLabel}</Label>
<Text variant="subtitle2" color={{ light: 'grey4', dark: 'grey6' }} weight="light">
{tagsDescriptionLabel}
</Text>
Expand Down Expand Up @@ -302,6 +303,7 @@ const ExtensionEditStep3Form: React.FC<ExtensionEditStep3FormProps> = props => {
}
}}
disabled={maxTagsSelected}
required={true}
multiple
/>
);
Expand Down
3 changes: 3 additions & 0 deletions libs/design-system-core/src/components/AutoComplete/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export type AutoCompleteProps = {
options?: string[];
placeholder?: InputProps['placeholder'];
disabled?: InputProps['disabled'];
required?: boolean;
value?: string;
customStyle?: string;
multiple?: boolean;
Expand Down Expand Up @@ -48,6 +49,7 @@ const AutoComplete: React.FC<AutoCompleteProps> = props => {
options,
placeholder,
disabled,
required,
customStyle = '',
value,
multiple,
Expand Down Expand Up @@ -145,6 +147,7 @@ const AutoComplete: React.FC<AutoCompleteProps> = props => {
customStyle="rounded-3xl"
radius={100}
disabled={disabled}
required={required}
/>
{showSuggestions && suggestions.length > 0 && (
<Stack direction="row" customStyle={'relative'}>
Expand Down

0 comments on commit ba4f32a

Please sign in to comment.