Skip to content

Commit

Permalink
fix: remove data from local storage
Browse files Browse the repository at this point in the history
  • Loading branch information
RitvikSardana committed Jan 30, 2025
1 parent 2639ebb commit d724b4c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions desk/src/components/CommentTextEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
</TextEditor>
</template>
<script setup lang="ts">
import { computed, ref } from "vue";
import { computed, ref, onMounted } from "vue";
import {
TextEditorFixedMenu,
TextEditor,
Expand All @@ -110,7 +110,9 @@ import { PreserveVideoControls } from "@/tiptap-extensions";
import { isContentEmpty, textEditorMenuButtons } from "@/utils";
const { agents: agentsList } = useAgentStore();
onMounted(() => {
agentsList.fetch();
});
const props = defineProps({
placeholder: {
type: String,
Expand All @@ -131,7 +133,7 @@ const doc = defineModel();
const attachments = useStorage("commentBoxAttachments" + doc.value.name, []);
const newComment = useStorage("commentBoxContent" + doc.value.name, "");
const commentEmpty = computed(() => {
return !newComment.value || newComment.value === "<p></p>";
return isContentEmpty(newComment.value);
});
const loading = ref(false);
Expand Down Expand Up @@ -166,8 +168,8 @@ async function submitComment() {
onSuccess: () => {
emit("submit");
loading.value = false;
attachments.value = [];
newComment.value = "";
attachments.value = null;
newComment.value = null;
},
onError: () => {
loading.value = false;
Expand Down
4 changes: 2 additions & 2 deletions desk/src/components/EmailEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ function addToReply(
}
function resetState() {
newEmail.value = "";
attachments.value = [];
newEmail.value = null;
attachments.value = null;
loading.value = false;
}
Expand Down

0 comments on commit d724b4c

Please sign in to comment.