Skip to content

Commit 0c020d0

Browse files
invalidate getLogGroup, fallback empty string description, New entry button
1 parent 28a1c43 commit 0c020d0

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

src/api/ologApi.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,9 @@ const enhancedApiWithTags = ologApi.enhanceEndpoints({
184184
searchLogs: {
185185
providesTags: [TagTypes.GetLogs]
186186
},
187+
getLogGroup: {
188+
providesTags: [TagTypes.GetLogs]
189+
},
187190
getLog: {
188191
providesTags: (result, error, { noInvalidate }) =>
189192
noInvalidate ? [] : [TagTypes.GetLogs]

src/components/AppNavBar/AppNavBar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ const AppNavBar = ({ advancedSearchOpen, setAdvancedSearchOpen }) => {
251251
boxShadow: "none"
252252
}}
253253
>
254-
Create log
254+
New entry
255255
</InternalButtonLink>
256256
</ListItem>
257257
) : null}

src/components/log/EditLog/EditLog.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const EditLog = ({ log }) => {
5959
properties: formData.properties,
6060
title: formData.title,
6161
level: formData.level?.name,
62-
description: formData.description
62+
description: formData.description || ""
6363
};
6464

6565
editLog({ log: body })
@@ -69,6 +69,7 @@ const EditLog = ({ log }) => {
6969
navigate(`/logs/${data.id}`);
7070
})
7171
.catch((error) => {
72+
setUpdatedLogEntryId(null);
7273
setEditInProgress(false);
7374
enqueueSnackbar("Failed to edit log entry. Please try again later.", {
7475
variant: "error"

src/components/log/ReplyLog/ReplyLog.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ const ReplyLog = ({ log }) => {
3333
properties: formData.properties,
3434
title: formData.title,
3535
level: formData.level?.name,
36-
description: formData.description,
37-
attachments: formData.attachments ?? []
36+
description: formData.description || "",
37+
attachments: formData.attachments || []
3838
};
3939
replyLog({ log: body, replyTo: log.id })
4040
.unwrap()

0 commit comments

Comments
 (0)