tests i can't run locally for now
Signed-off-by: marcin mikolajczak <git@mkljczk.pl> Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
committed by
marcin mikołajczak
parent
6cce0a0291
commit
b38e5ec8e3
@ -149,19 +149,19 @@ const ComposeForm: React.FC<IComposeForm> = ({ id, shouldCondense, autoFocus, cl
|
||||
};
|
||||
|
||||
const onSuggestionsClearRequested = () => {
|
||||
dispatch(clearComposeSuggestions());
|
||||
dispatch(clearComposeSuggestions(id));
|
||||
};
|
||||
|
||||
const onSuggestionsFetchRequested = (token: string | number) => {
|
||||
dispatch(fetchComposeSuggestions(token as string));
|
||||
dispatch(fetchComposeSuggestions(id, token as string));
|
||||
};
|
||||
|
||||
const onSuggestionSelected = (tokenStart: number, token: string | null, value: string | undefined) => {
|
||||
if (value) dispatch(selectComposeSuggestion(tokenStart, token, value, ['text']));
|
||||
if (value) dispatch(selectComposeSuggestion(id, tokenStart, token, value, ['text']));
|
||||
};
|
||||
|
||||
const onSpoilerSuggestionSelected = (tokenStart: number, token: string | null, value: AutoSuggestion) => {
|
||||
dispatch(selectComposeSuggestion(tokenStart, token, value, ['spoiler_text']));
|
||||
dispatch(selectComposeSuggestion(id, tokenStart, token, value, ['spoiler_text']));
|
||||
};
|
||||
|
||||
const handleChangeSpoilerText: React.ChangeEventHandler<HTMLInputElement> = (e) => {
|
||||
|
||||
@ -115,7 +115,6 @@ const EmojiPickerDropdown: React.FC<IEmojiPickerDropdown> = ({ onPickEmoji, butt
|
||||
};
|
||||
|
||||
const handlePickEmoji = (emoji: EmojiType) => {
|
||||
console.log(emoji);
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
dispatch(useEmoji(emoji));
|
||||
|
||||
|
||||
@ -61,13 +61,13 @@ const Option: React.FC<IOption> = ({
|
||||
}
|
||||
};
|
||||
|
||||
const onSuggestionsClearRequested = () => dispatch(clearComposeSuggestions());
|
||||
const onSuggestionsClearRequested = () => dispatch(clearComposeSuggestions(composeId));
|
||||
|
||||
const onSuggestionsFetchRequested = (token: string) => dispatch(fetchComposeSuggestions(token));
|
||||
const onSuggestionsFetchRequested = (token: string) => dispatch(fetchComposeSuggestions(composeId, token));
|
||||
|
||||
const onSuggestionSelected = (tokenStart: number, token: string | null, value: AutoSuggestion) => {
|
||||
if (token && typeof token === 'string') {
|
||||
dispatch(selectComposeSuggestion(tokenStart, token, value, ['poll', 'options', index]));
|
||||
dispatch(selectComposeSuggestion(composeId, tokenStart, token, value, ['poll', 'options', index]));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -22,8 +22,8 @@ const ScheduleButton: React.FC<IScheduleButton> = ({ composeId, disabled }) => {
|
||||
|
||||
const compose = useCompose(composeId);
|
||||
|
||||
const active = compose.schedule;
|
||||
const unavailable = compose.id;
|
||||
const active = !!compose.schedule;
|
||||
const unavailable = !!compose.id;
|
||||
|
||||
const handleClick = () => {
|
||||
if (active) {
|
||||
|
||||
@ -91,7 +91,7 @@ const Upload: React.FC<IUpload> = ({ composeId, id }) => {
|
||||
|
||||
const handleUndoClick: React.MouseEventHandler = e => {
|
||||
e.stopPropagation();
|
||||
dispatch(undoUploadCompose(media.id));
|
||||
dispatch(undoUploadCompose(composeId, media.id));
|
||||
};
|
||||
|
||||
const handleInputChange: React.ChangeEventHandler<HTMLTextAreaElement> = e => {
|
||||
@ -119,7 +119,7 @@ const Upload: React.FC<IUpload> = ({ composeId, id }) => {
|
||||
setDirtyDescription(null);
|
||||
|
||||
if (dirtyDescription !== null) {
|
||||
dispatch(changeUploadCompose(media.id, { dirtyDescription }));
|
||||
dispatch(changeUploadCompose(composeId, media.id, { dirtyDescription }));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user