mirror of
https://github.com/sqlchat/sqlchat.git
synced 2025-07-28 09:43:06 +08:00
chore: update util functions
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user