Skip to content

Commit

Permalink
fix(drupal): updates 20240207
Browse files Browse the repository at this point in the history
  • Loading branch information
a-buono committed Feb 7, 2024
1 parent 5c5a169 commit 83ba418
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ const SectionDetail: React.FC<CardDocumentDetailI> = (props) => {
})
);
}
userId && dispatch(GetItemDetail(id, userId, 'forum'));
userId && dispatch(GetItemDetail(id, userId, 'community'));
}
}
: undefined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ const ManageComment: React.FC<ManageCommentI> = ({
// @ts-ignore
if (res) {
userId &&
dispatch(GetItemDetail(id, userId, payload.entity || 'forum'));
dispatch(GetItemDetail(id, userId, payload.entity || 'community'));
dispatch(
ActionTracker({
target: 'tnd',
action_type: 'COMMENTO',
event_type:
payload.entity === 'board'
? 'NEWS'
: payload.entity === 'forum'
: payload.entity === 'community'
? 'TOPIC'
: 'DOCUMENTI',
category: payload.category_label || payload.category,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const ManageTopic: React.FC<ManageTopicI> = ({
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
if (res) {
userId && dispatch(GetItemDetail(id, userId, 'forum'));
userId && dispatch(GetItemDetail(id, userId, 'community'));
setNewFormValues({});
setStep('confirm');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const CommunityDetails = () => {

const getItemDetails = async () => {
if (id && userId) {
const res = await dispatch(GetItemDetail(id, userId, 'forum'));
const res = await dispatch(GetItemDetail(id, userId, 'community'));
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
if (res) {
Expand Down Expand Up @@ -104,7 +104,7 @@ const CommunityDetails = () => {
await dispatch(DeleteComment(commentId, reason));
if (id && userId) {
dispatch(GetCommentsList(id, userId));
dispatch(GetItemDetail(id, userId, 'forum'));
dispatch(GetItemDetail(id, userId, 'community'));
}
};

Expand Down
4 changes: 2 additions & 2 deletions fe-piattaforma/src/redux/features/forum/forumThunk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ const GetItemDetailsAction = {
};

export const GetItemDetail =
(itemId: string, userId: string, entity: 'board' | 'forum' | 'document') =>
(itemId: string, userId: string, entity: 'board' | 'community' | 'document') =>
async (dispatch: Dispatch) => {
try {
dispatch(showLoader());
Expand All @@ -638,7 +638,7 @@ export const GetItemDetail =
case 'board':
dispatch(setNewsDetail(res.data.data.items[0]));
break;
case 'forum':
case 'community':
dispatch(setTopicDetail(res.data.data.items[0]));
break;
case 'document':
Expand Down

0 comments on commit 83ba418

Please sign in to comment.