From 6288e50d45cb9a26812bc640901eee53aa8a1807 Mon Sep 17 00:00:00 2001 From: Saxon Fletcher Date: Mon, 17 Feb 2025 20:26:52 +1000 Subject: [PATCH] fixes --- .../Auth/Policies/PolicyTableRow/PolicyTableRow.utils.ts | 2 +- apps/studio/components/ui/AIEditor/index.tsx | 1 - apps/studio/components/ui/EditorPanel/EditorPanel.tsx | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyTableRow.utils.ts b/apps/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyTableRow.utils.ts index 6954d0f8c4a..dcbcbc3a7c3 100644 --- a/apps/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyTableRow.utils.ts +++ b/apps/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyTableRow.utils.ts @@ -12,7 +12,7 @@ export const generatePolicyCreateSQL = (policy: PostgresPolicy) => { } return ` -CREATE OR ALTER POLICY "${policy.name}" +ALTER POLICY "${policy.name}" ON "${policy.schema}"."${policy.table}" AS ${policy.action} FOR ${policy.command} diff --git a/apps/studio/components/ui/AIEditor/index.tsx b/apps/studio/components/ui/AIEditor/index.tsx index 961a7482665..d5e727b91ac 100644 --- a/apps/studio/components/ui/AIEditor/index.tsx +++ b/apps/studio/components/ui/AIEditor/index.tsx @@ -28,7 +28,6 @@ interface AIEditorProps { } const AIEditor = ({ - id, language = 'javascript', value, defaultValue = '', diff --git a/apps/studio/components/ui/EditorPanel/EditorPanel.tsx b/apps/studio/components/ui/EditorPanel/EditorPanel.tsx index f3620f45cde..0d544649746 100644 --- a/apps/studio/components/ui/EditorPanel/EditorPanel.tsx +++ b/apps/studio/components/ui/EditorPanel/EditorPanel.tsx @@ -42,7 +42,6 @@ export const EditorPanel = ({ onChange }: EditorPanelProps) => { const [isSaving, setIsSaving] = useState(false) const [error, setError] = useState() const [results, setResults] = useState(undefined) - const [showResults, setShowResults] = useState(false) const [showWarning, setShowWarning] = useState<'hasWriteOperation' | 'hasUnknownFunctions'>() const [currentValue, setCurrentValue] = useState(editorPanel.initialValue || '') const [showTemplates, setShowTemplates] = useState(false) @@ -59,7 +58,6 @@ export const EditorPanel = ({ onChange }: EditorPanelProps) => { const { mutate: executeSql, isLoading: isExecuting } = useExecuteSqlMutation({ onSuccess: async (res) => { - setShowResults(true) setResults(res.result) }, onError: (error) => {