diff --git a/apps/app/components/core/issues-view.tsx b/apps/app/components/core/issues-view.tsx index 96d4e0f83..8c93be74d 100644 --- a/apps/app/components/core/issues-view.tsx +++ b/apps/app/components/core/issues-view.tsx @@ -118,18 +118,6 @@ export const IssuesView: React.FC = ({ : null ); - const { data: viewDetails } = useSWR( - workspaceSlug && projectId && viewId ? VIEW_DETAILS(viewId as string) : null, - workspaceSlug && projectId && viewId - ? () => - viewsService.getViewDetails( - workspaceSlug as string, - projectId as string, - viewId as string - ) - : null - ); - const handleDeleteIssue = useCallback( (issue: IIssue) => { setDeleteIssueModal(true); @@ -405,8 +393,6 @@ export const IssuesView: React.FC = ({ (key) => filters[key as keyof IIssueFilterOptions] === null ); - const isUpdatingView = JSON.stringify(filters) === JSON.stringify(viewDetails?.query_data); - return ( <> = ({ })} - {viewId - ? isUpdatingView && ( - { - if (viewId) { - setFilters({}, true); - setToastAlert({ - title: "View updated", - message: "Your view has been updated", - type: "success", - }); - } else - setCreateViewModal({ - query: filters, - }); - }} - className="flex items-center gap-2 text-sm" - > - Update view - - ) - : Object.keys(filters).length > 0 && - nullFilters.length !== Object.keys(filters).length && ( - { - if (viewId) { - setFilters({}, true); - setToastAlert({ - title: "View updated", - message: "Your view has been updated", - type: "success", - }); - } else - setCreateViewModal({ - query: filters, - }); - }} - className="flex items-center gap-2 text-sm" - > - - Save view - - )} + {Object.keys(filters).length > 0 && nullFilters.length !== Object.keys(filters).length && ( + { + if (viewId) { + setFilters({}, true); + setToastAlert({ + title: "View updated", + message: "Your view has been updated", + type: "success", + }); + } else + setCreateViewModal({ + query: filters, + }); + }} + className="flex items-center gap-2 text-sm" + > + {!viewId && } + {viewId ? "Update" : "Save"} view + + )}