Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/common/DateTimeChange.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ const DateTimeChange = ({ group, page, time }) => {
);
};

export default DateTimeChange;
export default React.memo(DateTimeChange);
2 changes: 1 addition & 1 deletion src/components/common/Tags.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ const Tags = ({ tags, type, onRemove }) => {
);
};

export default Tags;
export default React.memo(Tags);
2 changes: 1 addition & 1 deletion src/components/introduce/ApplyStatusButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@ const ApplyStatusButton = ({
);
};

export default ApplyStatusButton;
export default React.memo(ApplyStatusButton);
2 changes: 1 addition & 1 deletion src/components/introduce/StudyIntroduceForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,4 @@ const StudyIntroduceForm = ({
);
};

export default StudyIntroduceForm;
export default React.memo(StudyIntroduceForm);
2 changes: 1 addition & 1 deletion src/components/main/StudyGroup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ const StudyGroup = ({ group, realTime }) => {
);
};

export default StudyGroup;
export default React.memo(StudyGroup);
2 changes: 1 addition & 1 deletion src/components/main/StudyGroups.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ const StudyGroups = ({ groups, realTime, user }) => (
</>
);

export default StudyGroups;
export default React.memo(StudyGroups);
2 changes: 1 addition & 1 deletion src/containers/groups/StudyGroupsContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ const StudyGroupsContainer = () => {
);
};

export default StudyGroupsContainer;
export default React.memo(StudyGroupsContainer);
2 changes: 1 addition & 1 deletion src/containers/introduce/IntroduceContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ const IntroduceContainer = ({ groupId }) => {
);
};

export default IntroduceContainer;
export default React.memo(IntroduceContainer);
10 changes: 5 additions & 5 deletions src/containers/write/TagsFormContainer.jsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import React from 'react';
import React, { useCallback } from 'react';

import { useDispatch, useSelector } from 'react-redux';

import { getGroup } from '../../util/utils';
import TagsForm from '../../components/write/TagsForm';

import { changeWriteField } from '../../reducers/groupSlice';

import TagsForm from '../../components/write/TagsForm';

const TagsFormContainer = () => {
const dispatch = useDispatch();

const { tags } = useSelector(getGroup('writeField'));

const onChangeTags = (nextTags) => {
const onChangeTags = useCallback((nextTags) => {
dispatch(
changeWriteField({
name: 'tags',
value: nextTags,
}),
);
};
}, [dispatch]);

return (
<TagsForm onChange={onChangeTags} tags={tags} />
Expand Down
6 changes: 3 additions & 3 deletions src/containers/write/WriteFormContainer.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { useCallback } from 'react';

import { useUnmount } from 'react-use';
import { useDispatch, useSelector } from 'react-redux';
Expand All @@ -13,14 +13,14 @@ const WriteFormContainer = () => {

const writeField = useSelector(getGroup('writeField'));

const onChangeWriteField = ({ name, value }) => {
const onChangeWriteField = useCallback(({ name, value }) => {
dispatch(
changeWriteField({
name,
value,
}),
);
};
}, [dispatch]);

useUnmount(() => dispatch(clearWriteFields()));

Expand Down
2 changes: 1 addition & 1 deletion src/pages/IntroducePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ const IntroducePage = ({ params }) => {
</Responsive>
);
};
export default IntroducePage;
export default React.memo(IntroducePage);
2 changes: 1 addition & 1 deletion src/pages/MainPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ const MainPage = () => (
</Responsive>
);

export default MainPage;
export default React.memo(MainPage);
2 changes: 1 addition & 1 deletion src/services/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const branchGetGroups = (tag) => {
if (tag) {
return db
.collection('groups')
.orderBy('applyEndDate', 'asc')
.where('tags', 'array-contains', tag)
.orderBy('applyEndDate', 'asc')
.get();
}

Expand Down