diff --git a/apps/studio/components/layouts/Tabs/SaveButton.tsx b/apps/studio/components/layouts/Tabs/SaveButton.tsx
index 2b4970714b2..24cfefb31f8 100644
--- a/apps/studio/components/layouts/Tabs/SaveButton.tsx
+++ b/apps/studio/components/layouts/Tabs/SaveButton.tsx
@@ -11,13 +11,13 @@ import { useProfile } from 'lib/profile'
import { createSqlSnippetSkeletonV2 } from 'components/interfaces/SQLEditor/SQLEditor.utils'
import { untitledSnippetTitle } from 'components/interfaces/SQLEditor/SQLEditor.constants'
import { useSqlEditorV2StateSnapshot } from 'state/sql-editor-v2'
-import { createTabId, useTabsStateSnapshot } from 'state/tabs'
+import { useTabsStateSnapshot } from 'state/tabs'
import uuidv4 from 'lib/uuid'
-import { Button } from 'ui'
+import { Button, cn } from 'ui'
export const SaveButton = () => {
const router = useRouter()
- const { ref, id } = useParams()
+ const { ref } = useParams()
const { profile } = useProfile()
const { data: project } = useSelectedProjectQuery()
const { isHipaaProjectDisallowed } = useOrgAiOptInLevel()
@@ -48,13 +48,7 @@ export const SaveButton = () => {
// Show save button if:
// 1. SQL is different from snippet SQL (for existing snippets)
// 2. OR no snippet exists and SQL is not empty (for new tabs)
- const showSaveButton = snippetId
- ? tabSql !== snippetSql
- : tabSql.trim().length > 0
-
- if (!showSaveButton) {
- return null
- }
+ const showSaveButton = snippetId ? tabSql !== snippetSql : tabSql.trim().length > 0
const handleSave = async () => {
if (!ref || !profile || !project) return
@@ -116,7 +110,7 @@ export const SaveButton = () => {
icon={