feat: add placeholder query

This commit is contained in:
TzeYiing authored and Joshen Lim committed 2023-03-02 15:27:13 +08:00
1 parent eb363850cb
commit fae9ff5ccb
1 file changed
+3 -2
@@ -29,13 +29,15 @@ import { useUpgradePrompt } from 'hooks/misc/useUpgradePrompt'
import UpgradePrompt from 'components/interfaces/Settings/Logs/UpgradePrompt'
import LogsExplorerHeader from 'components/ui/Logs/LogsExplorerHeader'
const PLACEHOLDER_QUERY =
'select\n cast(timestamp as datetime) as timestamp,\n event_message, metadata \nfrom edge_logs \nlimit 5'
export const LogsExplorerPage: NextPageWithLayout = () => {
useEditorHints()
const { ui, content } = useStore()
const router = useRouter()
const { ref: projectRef, q, ite, its } = useParams()
const [editorId, setEditorId] = useState<string>(uuidv4())
const [editorValue, setEditorValue] = useState<string>('')
const [editorValue, setEditorValue] = useState<string>(PLACEHOLDER_QUERY)
const [saveModalOpen, setSaveModalOpen] = useState<boolean>(false)
const [warnings, setWarnings] = useState<LogsWarning[]>([])
const { data: subscription } = useProjectSubscriptionQuery({ projectRef })
@@ -147,7 +149,6 @@ export const LogsExplorerPage: NextPageWithLayout = () => {
}
}
return (
<div className="w-full h-full px-5 py-6 mx-auto">
<LogsExplorerHeader />