chore: update util functions

This commit is contained in:
steven
2023-03-28 17:10:43 +08:00
parent 3e7dd33013
commit 55a2f99e2d
6 changed files with 19 additions and 10 deletions

View File

@ -2,6 +2,7 @@ import { toast } from "react-hot-toast";
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
import { oneDark } from "react-syntax-highlighter/dist/cjs/styles/prism";
import { useConnectionStore, useQueryStore } from "@/store";
import { checkStatementIsSelect } from "@/utils";
import Icon from "./Icon";
interface Props {
@ -9,10 +10,6 @@ interface Props {
value: string;
}
const checkStatementIsSelect = (statement: string) => {
return statement.toUpperCase().trim().startsWith("SELECT");
};
export const CodeBlock = (props: Props) => {
const { language, value } = props;
const connectionStore = useConnectionStore();