-
+
{intl.formatMessage(messages.confirmationCancel)}
-
@@ -45,16 +45,16 @@ const Confirmation = ({
Confirmation.propTypes = {
isOpen: PropTypes.bool.isRequired,
onClose: PropTypes.func.isRequired,
- comfirmAction: PropTypes.func.isRequired,
+ confirmAction: PropTypes.func.isRequired,
title: PropTypes.string.isRequired,
description: PropTypes.string.isRequired,
- closeButtonVaraint: PropTypes.string,
+ closeButtonVariant: PropTypes.string,
confirmButtonVariant: PropTypes.string,
confirmButtonText: PropTypes.string,
};
Confirmation.defaultProps = {
- closeButtonVaraint: 'default',
+ closeButtonVariant: 'default',
confirmButtonVariant: 'primary',
confirmButtonText: '',
};
diff --git a/src/discussions/common/HoverCard.jsx b/src/discussions/common/HoverCard.jsx
index 05c51cbe2..62eab556f 100644
--- a/src/discussions/common/HoverCard.jsx
+++ b/src/discussions/common/HoverCard.jsx
@@ -31,7 +31,7 @@ const HoverCard = ({
const intl = useIntl();
const { enableInContextSidebar } = useContext(DiscussionContext);
const { isClosed } = useContext(PostCommentsContext);
- const isUserPrivilagedInPostingRestriction = useUserPostingEnabled();
+ const isUserPrivilegedInPostingRestriction = useUserPostingEnabled();
return (
- {isUserPrivilagedInPostingRestriction && (
+ {isUserPrivilegedInPostingRestriction && (
{
e.preventDefault();
onLike();
@@ -99,7 +99,7 @@ const HoverCard = ({
iconAs={Icon}
size="sm"
alt="Follow"
- iconClassNames="follow-icon-dimentions"
+ iconClassNames="follow-icon-dimensions"
onClick={(e) => {
e.preventDefault();
onFollow();
diff --git a/src/discussions/data/hooks.test.jsx b/src/discussions/data/hooks.test.jsx
index 8b42a4549..219f79589 100644
--- a/src/discussions/data/hooks.test.jsx
+++ b/src/discussions/data/hooks.test.jsx
@@ -104,10 +104,10 @@ describe('Hooks', () => {
describe('useUserPostingEnabled', () => {
const ComponentWithHook = () => {
- const isUserPrivilagedInPostingRestriction = useUserPostingEnabled();
+ const isUserPrivilegedInPostingRestriction = useUserPostingEnabled();
return (
- {String(isUserPrivilagedInPostingRestriction)}
+ {String(isUserPrivilegedInPostingRestriction)}
);
};
diff --git a/src/discussions/data/selectors.js b/src/discussions/data/selectors.js
index f33a923fc..b6c9b2e20 100644
--- a/src/discussions/data/selectors.js
+++ b/src/discussions/data/selectors.js
@@ -12,7 +12,7 @@ export const selectUserIsStaff = state => state.config.isUserAdmin;
export const selectUserIsGroupTa = state => state.config.isGroupTa;
-export const selectconfigLoadingStatus = state => state.config.status;
+export const selectConfigLoadingStatus = state => state.config.status;
export const selectLearnersTabEnabled = state => state.config.learnersTabEnabled;
diff --git a/src/discussions/discussions-home/DiscussionSidebar.jsx b/src/discussions/discussions-home/DiscussionSidebar.jsx
index bece21720..66c81633c 100644
--- a/src/discussions/discussions-home/DiscussionSidebar.jsx
+++ b/src/discussions/discussions-home/DiscussionSidebar.jsx
@@ -17,7 +17,7 @@ import { DiscussionContext } from '../common/context';
import {
useContainerSize, useIsOnDesktop, useIsOnXLDesktop, useShowLearnersTab,
} from '../data/hooks';
-import { selectconfigLoadingStatus, selectEnableInContext } from '../data/selectors';
+import { selectConfigLoadingStatus, selectEnableInContext } from '../data/selectors';
const TopicPostsView = lazy(() => import('../in-context-topics/TopicPostsView'));
const InContextTopicsView = lazy(() => import('../in-context-topics/TopicsView'));
@@ -32,7 +32,7 @@ const DiscussionSidebar = ({ displaySidebar, postActionBarRef }) => {
const isOnXLDesktop = useIsOnXLDesktop();
const { enableInContextSidebar } = useContext(DiscussionContext);
const enableInContext = useSelector(selectEnableInContext);
- const configStatus = useSelector(selectconfigLoadingStatus);
+ const configStatus = useSelector(selectConfigLoadingStatus);
const redirectToLearnersTab = useShowLearnersTab();
const sidebarRef = useRef(null);
const postActionBarHeight = useContainerSize(postActionBarRef);
diff --git a/src/discussions/discussions-home/DiscussionsHome.jsx b/src/discussions/discussions-home/DiscussionsHome.jsx
index 31bb658fe..a1616722a 100644
--- a/src/discussions/discussions-home/DiscussionsHome.jsx
+++ b/src/discussions/discussions-home/DiscussionsHome.jsx
@@ -55,7 +55,7 @@ const DiscussionsHome = () => {
useFeedbackWrapper();
/* Display the content area if we are currently viewing/editing a post or creating one.
If the window is larger than a particular size, show the sidebar for navigating between posts/topics.
- However, for smaller screens or embeds, onlyshow the sidebar if the content area isn't displayed. */
+ However, for smaller screens or embeds, only show the sidebar if the content area isn't displayed. */
const displayContentArea = (postId || postEditorVisible || (learnerUsername && postId));
if (displayContentArea) { displaySidebar = isOnDesktop; }
diff --git a/src/discussions/discussions-home/DiscussionsRestrictionBanner.jsx b/src/discussions/discussions-home/DiscussionsRestrictionBanner.jsx
index e948036b9..ecf7388bf 100644
--- a/src/discussions/discussions-home/DiscussionsRestrictionBanner.jsx
+++ b/src/discussions/discussions-home/DiscussionsRestrictionBanner.jsx
@@ -6,13 +6,13 @@ import { useIntl } from '@edx/frontend-platform/i18n';
import { PageBanner } from '@edx/paragon';
import { RequestStatus } from '../../data/constants';
-import { selectconfigLoadingStatus, selectIsPostingEnabled } from '../data/selectors';
+import { selectConfigLoadingStatus, selectIsPostingEnabled } from '../data/selectors';
import messages from '../messages';
const DiscussionsRestrictionBanner = () => {
const intl = useIntl();
const isPostingEnabled = useSelector(selectIsPostingEnabled);
- const configLoadingStatus = useSelector(selectconfigLoadingStatus);
+ const configLoadingStatus = useSelector(selectConfigLoadingStatus);
const [showBanner, setShowBanner] = useState(true);
const handleDismiss = useCallback(() => {
diff --git a/src/discussions/discussions-home/FeedbackWrapper.jsx b/src/discussions/discussions-home/FeedbackWrapper.jsx
index 1627f869a..ffd4bd57e 100644
--- a/src/discussions/discussions-home/FeedbackWrapper.jsx
+++ b/src/discussions/discussions-home/FeedbackWrapper.jsx
@@ -7,7 +7,7 @@ import { logError } from '@edx/frontend-platform/logging';
import { RequestStatus } from '../../data/constants';
import {
- selectconfigLoadingStatus,
+ selectConfigLoadingStatus,
selectIsCourseAdmin,
selectIsCourseStaff,
selectUserIsGroupTa,
@@ -19,7 +19,7 @@ export default function useFeedbackWrapper() {
const isUserGroupTA = useSelector(selectUserIsGroupTa);
const isCourseAdmin = useSelector(selectIsCourseAdmin);
const isCourseStaff = useSelector(selectIsCourseStaff);
- const configStatus = useSelector(selectconfigLoadingStatus);
+ const configStatus = useSelector(selectConfigLoadingStatus);
useEffect(() => {
if (configStatus === RequestStatus.SUCCESSFUL) {
diff --git a/src/discussions/empty-posts/EmptyPosts.test.jsx b/src/discussions/empty-posts/EmptyPosts.test.jsx
index 501a6a5b0..6d654a809 100644
--- a/src/discussions/empty-posts/EmptyPosts.test.jsx
+++ b/src/discussions/empty-posts/EmptyPosts.test.jsx
@@ -57,7 +57,7 @@ describe('EmptyPage', () => {
store = initializeStore();
});
- test('"posts youve interacted with" message shown when no posts in system', async () => {
+ test('"posts you\'ve interacted with" message shown when no posts in system', async () => {
renderComponent(`/${courseId}/my-posts/`);
expect(
screen.queryByText(messages.emptyMyPosts.defaultMessage),
diff --git a/src/discussions/learners/LearnersView.jsx b/src/discussions/learners/LearnersView.jsx
index 9cbc9ff39..51e58a30e 100644
--- a/src/discussions/learners/LearnersView.jsx
+++ b/src/discussions/learners/LearnersView.jsx
@@ -10,7 +10,7 @@ import { Button, Spinner } from '@edx/paragon';
import SearchInfo from '../../components/SearchInfo';
import { RequestStatus, Routes } from '../../data/constants';
-import { selectconfigLoadingStatus, selectLearnersTabEnabled } from '../data/selectors';
+import { selectConfigLoadingStatus, selectLearnersTabEnabled } from '../data/selectors';
import NoResults from '../posts/NoResults';
import {
learnersLoadingStatus,
@@ -33,7 +33,7 @@ const LearnersView = () => {
const nextPage = useSelector(selectLearnerNextPage());
const loadingStatus = useSelector(learnersLoadingStatus());
const usernameSearch = useSelector(selectUsernameSearch());
- const courseConfigLoadingStatus = useSelector(selectconfigLoadingStatus);
+ const courseConfigLoadingStatus = useSelector(selectConfigLoadingStatus);
const learnersTabEnabled = useSelector(selectLearnersTabEnabled);
const learners = useSelector(selectAllLearners);
diff --git a/src/discussions/post-comments/comments/CommentsView.jsx b/src/discussions/post-comments/comments/CommentsView.jsx
index f3e6e27e9..430034614 100644
--- a/src/discussions/post-comments/comments/CommentsView.jsx
+++ b/src/discussions/post-comments/comments/CommentsView.jsx
@@ -16,7 +16,7 @@ const CommentsView = ({ endorsed }) => {
const intl = useIntl();
const [addingResponse, setAddingResponse] = useState(false);
const { isClosed } = useContext(PostCommentsContext);
- const isUserPrivilagedInPostingRestriction = useUserPostingEnabled();
+ const isUserPrivilegedInPostingRestriction = useUserPostingEnabled();
const {
endorsedCommentsIds,
@@ -66,7 +66,7 @@ const CommentsView = ({ endorsed }) => {
)}
{isLoading && !showLoadMoreResponses && (
-
+
)}
@@ -90,7 +90,7 @@ const CommentsView = ({ endorsed }) => {
{handleDefinition(messages.responseCount, unEndorsedCommentsIds.length)}
{unEndorsedCommentsIds.length === 0 &&
}
{handleComments(unEndorsedCommentsIds, false)}
- {(isUserPrivilagedInPostingRestriction && !!unEndorsedCommentsIds.length && !isClosed) && (
+ {(isUserPrivilegedInPostingRestriction && !!unEndorsedCommentsIds.length && !isClosed) && (
{!addingResponse && (
{
// If the comment has a parent comment, it won't have any children, so don't fetch them.
@@ -119,10 +119,10 @@ const Comment = ({
), [id, currentPage, sortedOrder]);
const handleAddCommentButton = useCallback(() => {
- if (isUserPrivilagedInPostingRestriction) {
+ if (isUserPrivilegedInPostingRestriction) {
setReplying(true);
}
- }, [isUserPrivilagedInPostingRestriction]);
+ }, [isUserPrivilegedInPostingRestriction]);
const handleCommentLike = useCallback(async () => {
await dispatch(editComment(id, { voted: !voted }));
@@ -154,8 +154,8 @@ const Comment = ({
title={intl.formatMessage(messages.deleteResponseTitle)}
description={intl.formatMessage(messages.deleteResponseDescription)}
onClose={hideDeleteConfirmation}
- comfirmAction={handleDeleteConfirmation}
- closeButtonVaraint="tertiary"
+ confirmAction={handleDeleteConfirmation}
+ closeButtonVariant="tertiary"
confirmButtonText={intl.formatMessage(messages.deleteConfirmationDelete)}
/>
{!abuseFlagged && (
@@ -164,7 +164,7 @@ const Comment = ({
title={intl.formatMessage(messages.reportResponseTitle)}
description={intl.formatMessage(messages.reportResponseDescription)}
onClose={hideReportConfirmation}
- comfirmAction={handleReportConfirmation}
+ confirmAction={handleReportConfirmation}
confirmButtonVariant="danger"
/>
)}
@@ -265,7 +265,7 @@ const Comment = ({
/>
) : (
- !isClosed && isUserPrivilagedInPostingRestriction && (inlineReplies.length >= 5) && (
+ !isClosed && isUserPrivilegedInPostingRestriction && (inlineReplies.length >= 5) && (
{
title={intl.formatMessage(messages.deleteCommentTitle)}
description={intl.formatMessage(messages.deleteCommentDescription)}
onClose={hideDeleteConfirmation}
- comfirmAction={handleDeleteConfirmation}
- closeButtonVaraint="tertiary"
+ confirmAction={handleDeleteConfirmation}
+ closeButtonVariant="tertiary"
confirmButtonText={intl.formatMessage(messages.deleteConfirmationDelete)}
/>
{!abuseFlagged && (
@@ -93,7 +93,7 @@ const Reply = ({ responseId }) => {
title={intl.formatMessage(messages.reportCommentTitle)}
description={intl.formatMessage(messages.reportCommentDescription)}
onClose={hideReportConfirmation}
- comfirmAction={handleReportConfirmation}
+ confirmAction={handleReportConfirmation}
confirmButtonVariant="danger"
/>
)}
diff --git a/src/discussions/posts/PostsList.jsx b/src/discussions/posts/PostsList.jsx
index 28c30c49c..6717ca98f 100644
--- a/src/discussions/posts/PostsList.jsx
+++ b/src/discussions/posts/PostsList.jsx
@@ -11,7 +11,7 @@ import { Button, Spinner } from '@edx/paragon';
import { RequestStatus } from '../../data/constants';
import { DiscussionContext } from '../common/context';
-import { selectconfigLoadingStatus, selectUserHasModerationPrivileges, selectUserIsStaff } from '../data/selectors';
+import { selectConfigLoadingStatus, selectUserHasModerationPrivileges, selectUserIsStaff } from '../data/selectors';
import { fetchUserPosts } from '../learners/data/thunks';
import messages from '../messages';
import { usePostList } from './data/hooks';
@@ -35,7 +35,7 @@ const PostsList = ({
const nextPage = useSelector(selectThreadNextPage());
const userHasModerationPrivileges = useSelector(selectUserHasModerationPrivileges);
const userIsStaff = useSelector(selectUserIsStaff);
- const configStatus = useSelector(selectconfigLoadingStatus);
+ const configStatus = useSelector(selectConfigLoadingStatus);
const sortedPostsIds = usePostList(postsIds);
const showOwnPosts = page === 'my-posts';
diff --git a/src/discussions/posts/post-actions-bar/PostActionsBar.jsx b/src/discussions/posts/post-actions-bar/PostActionsBar.jsx
index 157634082..04e3a7f27 100644
--- a/src/discussions/posts/post-actions-bar/PostActionsBar.jsx
+++ b/src/discussions/posts/post-actions-bar/PostActionsBar.jsx
@@ -13,7 +13,7 @@ import Search from '../../../components/Search';
import { RequestStatus } from '../../../data/constants';
import { DiscussionContext } from '../../common/context';
import { useUserPostingEnabled } from '../../data/hooks';
-import { selectconfigLoadingStatus, selectEnableInContext } from '../../data/selectors';
+import { selectConfigLoadingStatus, selectEnableInContext } from '../../data/selectors';
import { TopicSearchBar as IncontextSearch } from '../../in-context-topics/topic-search';
import { postMessageToParent } from '../../utils';
import { showPostEditor } from '../data';
@@ -24,9 +24,9 @@ import './actionBar.scss';
const PostActionsBar = () => {
const intl = useIntl();
const dispatch = useDispatch();
- const loadingStatus = useSelector(selectconfigLoadingStatus);
+ const loadingStatus = useSelector(selectConfigLoadingStatus);
const enableInContext = useSelector(selectEnableInContext);
- const isUserPrivilagedInPostingRestriction = useUserPostingEnabled();
+ const isUserPrivilegedInPostingRestriction = useUserPostingEnabled();
const { enableInContextSidebar, page } = useContext(DiscussionContext);
const handleCloseInContext = useCallback(() => {
@@ -49,7 +49,7 @@ const PostActionsBar = () => {
{intl.formatMessage(messages.title)}
)}
- {loadingStatus === RequestStatus.SUCCESSFUL && isUserPrivilagedInPostingRestriction && (
+ {loadingStatus === RequestStatus.SUCCESSFUL && isUserPrivilegedInPostingRestriction && (
<>
{!enableInContextSidebar && }
{
iconAs={Icon}
onClick={handleCloseInContext}
alt={intl.formatMessage(messages.close)}
- iconClassNames="spinner-dimentions"
- className="spinner-dimentions"
+ iconClassNames="spinner-dimensions"
+ className="spinner-dimensions"
/>
>
diff --git a/src/discussions/posts/post-editor/PostEditor.test.jsx b/src/discussions/posts/post-editor/PostEditor.test.jsx
index 6c8851b5e..1c8bda181 100644
--- a/src/discussions/posts/post-editor/PostEditor.test.jsx
+++ b/src/discussions/posts/post-editor/PostEditor.test.jsx
@@ -118,7 +118,7 @@ describe('PostEditor', () => {
expect(screen.queryAllByRole('radio')).toHaveLength(2);
// 2 categories with 4 subcategories each
expect(screen.queryAllByText(/category-\d-topic \d/)).toHaveLength(8);
- // 3 non courseare topics
+ // 3 non courseware topics
expect(screen.queryAllByText(/ncw-topic \d/)).toHaveLength(3);
expect(screen.queryByText('cohort', { exact: false })).not.toBeInTheDocument();
expect(screen.queryByText('Post anonymously')).not.toBeInTheDocument();
@@ -199,7 +199,7 @@ describe('PostEditor', () => {
await renderComponent();
// Initially the user can't select a cohort
expect(screen.queryByRole('combobox', { name: /cohort visibility/i })).not.toBeInTheDocument();
- // All coursweare topics are divided
+ // All courseware topics are divided
[1, 2].forEach(catId => {
[1, 2, 3, 4].forEach((topicId) => {
act(() => {
diff --git a/src/discussions/posts/post/LikeButton.jsx b/src/discussions/posts/post/LikeButton.jsx
index 6adee2de8..afc4b1a60 100644
--- a/src/discussions/posts/post/LikeButton.jsx
+++ b/src/discussions/posts/post/LikeButton.jsx
@@ -31,10 +31,10 @@ const LikeButton = ({ count, onClick, voted }) => {
diff --git a/src/discussions/posts/post/Post.jsx b/src/discussions/posts/post/Post.jsx
index 0911dc762..1f7ee1f92 100644
--- a/src/discussions/posts/post/Post.jsx
+++ b/src/discussions/posts/post/Post.jsx
@@ -138,8 +138,8 @@ const Post = ({ handleAddResponseButton }) => {
title={intl.formatMessage(messages.deletePostTitle)}
description={intl.formatMessage(messages.deletePostDescription)}
onClose={hideDeleteConfirmation}
- comfirmAction={handleDeleteConfirmation}
- closeButtonVaraint="tertiary"
+ confirmAction={handleDeleteConfirmation}
+ closeButtonVariant="tertiary"
confirmButtonText={intl.formatMessage(messages.deleteConfirmationDelete)}
/>
{!abuseFlagged && (
@@ -148,7 +148,7 @@ const Post = ({ handleAddResponseButton }) => {
title={intl.formatMessage(messages.reportPostTitle)}
description={intl.formatMessage(messages.reportPostDescription)}
onClose={hideReportConfirmation}
- comfirmAction={handleReportConfirmation}
+ confirmAction={handleReportConfirmation}
confirmButtonVariant="danger"
/>
)}
diff --git a/src/discussions/posts/post/PostFooter.jsx b/src/discussions/posts/post/PostFooter.jsx
index e57ac8bc4..131e60bcd 100644
--- a/src/discussions/posts/post/PostFooter.jsx
+++ b/src/discussions/posts/post/PostFooter.jsx
@@ -56,8 +56,8 @@ const PostFooter = ({
return true;
}}
iconAs={Icon}
- iconClassNames="follow-icon-dimentions"
- className="post-footer-icon-dimentions"
+ iconClassNames="follow-icon-dimensions"
+ className="post-footer-icon-dimensions"
alt="Follow"
/>
diff --git a/src/discussions/tours/data/api.js b/src/discussions/tours/data/api.js
index e01bafe59..938f66584 100644
--- a/src/discussions/tours/data/api.js
+++ b/src/discussions/tours/data/api.js
@@ -9,7 +9,7 @@ export const getDiscussionTourUrl = () => `${getConfig().LMS_BASE_URL}/api/user_
* This function makes an HTTP GET request to the API to retrieve a list of tours for the authenticated user.
* @returns {Promise} - A promise that resolves to the API response data.
*/
-export async function getDiscssionTours() {
+export async function getDiscussionTours() {
const { data } = await getAuthenticatedHttpClient()
.get(getDiscussionTourUrl());
return data;
diff --git a/src/discussions/tours/data/thunks.js b/src/discussions/tours/data/thunks.js
index 7cebe0548..aa6fa4e6d 100644
--- a/src/discussions/tours/data/thunks.js
+++ b/src/discussions/tours/data/thunks.js
@@ -1,7 +1,7 @@
import { camelCaseObject } from '@edx/frontend-platform';
import { logError } from '@edx/frontend-platform/logging';
-import { getDiscssionTours, updateDiscussionTour } from './api';
+import { getDiscussionTours, updateDiscussionTour } from './api';
import {
discussionsTourRequest,
discussionsToursRequestError,
@@ -21,7 +21,7 @@ export function fetchDiscussionTours() {
return async (dispatch) => {
try {
dispatch(discussionsTourRequest());
- const data = await getDiscssionTours();
+ const data = await getDiscussionTours();
dispatch(fetchUserDiscussionsToursSuccess(camelCaseObject(normaliseTourData(data))));
} catch (error) {
dispatch(discussionsToursRequestError());
diff --git a/src/index.scss b/src/index.scss
index 8fdbb139f..613e10cd7 100755
--- a/src/index.scss
+++ b/src/index.scss
@@ -69,22 +69,22 @@ $fa-font-path: "~font-awesome/fonts";
font-family: "Inter";
}
-.post-footer-icon-dimentions {
+.post-footer-icon-dimensions {
width: 32px !important;
height: 32px !important;
}
-.like-icon-dimentions {
+.like-icon-dimensions {
width: 21px !important;
height: 23px !important;
}
-.follow-icon-dimentions {
+.follow-icon-dimensions {
width: 21px !important;
height: 24px !important;
}
-.dropdown-icon-dimentions {
+.dropdown-icon-dimensions {
width: 20px !important;
height: 21px !important;
}
@@ -469,7 +469,7 @@ header {
}
}
-.spinner-dimentions {
+.spinner-dimensions {
height: 24px !important;
width: 24px !important;
}