Skip to content

Commit

Permalink
Fix: blank posts and comments (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
lindsaymoralesb authored Jul 31, 2024
1 parent dd3bcb9 commit 19e3939
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion JoyboyCommunity/src/screens/CreatePost/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const CreatePost: React.FC<CreatePostScreenProps> = ({navigation}) => {
};

const handleSendNote = async () => {
if (!note || note?.length == 0) {
if (!note || note?.trim().length == 0) {
showToast({type: 'error', title: 'Please write your note'});
return;
}
Expand Down
2 changes: 1 addition & 1 deletion JoyboyCommunity/src/screens/PostDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const PostDetail: React.FC<PostDetailScreenProps> = ({navigation, route})
const {showToast} = useToast();

const handleSendComment = async () => {
if (!comment || comment?.length == 0) {
if (!comment || comment?.trim().length == 0) {
showToast({type: 'error', title: 'Please write your comment'});
return;
}
Expand Down

0 comments on commit 19e3939

Please sign in to comment.