Skip to content

Commit 56c384a

Browse files
authored
chore: fix composer image and toast (#6104)
1 parent 5d8906d commit 56c384a

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

packages/shared/src/components/post/composer/TextForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export const TextForm = forwardRef<TextFormHandle, TextFormProps>(
159159
src={cover.preview}
160160
alt="Post cover"
161161
className={classNames(
162-
'block aspect-[2/1] w-full rounded-16 object-cover transition-opacity',
162+
'block h-44 w-full rounded-16 object-cover transition-opacity',
163163
'group-hover:brightness-95',
164164
cover.isUploading && 'opacity-50',
165165
)}

packages/shared/src/components/post/composer/useComposerSubmit.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import type {
1010
ExternalLinkPreview,
1111
} from '../../../graphql/posts';
1212
import type { Squad } from '../../../graphql/sources';
13+
import { moderationRequired } from '../../squads/utils';
1314
import {
1415
POLL_OPTIONS_MIN,
1516
STANDUP_TOPIC_MAX_LENGTH,
@@ -161,9 +162,14 @@ export const useComposerSubmit = ({
161162
sourceIds: selectedIds,
162163
...payload,
163164
} as unknown as CreatePostInMultipleSourcesArgs);
164-
return;
165+
} else {
166+
await onSubmitFreeformPost(payload, primary as Squad);
165167
}
166-
await onSubmitFreeformPost(payload, primary as Squad);
168+
displayToast(
169+
!isMulti && moderationRequired(primary as Squad)
170+
? '✅ Your post has been submitted for moderation'
171+
: '✅ Your post has been created!',
172+
);
167173
};
168174

169175
const submitPoll = async () => {

0 commit comments

Comments
 (0)