kanban / src /hooks /useGrammarCheck.ts
Leon4gr45's picture
Deploy magic-resume as Docker Space (port 3000) (part 2)
aa1ee73 verified
Raw
History Blame Contribute Delete
525 Bytes
import { useGrammarStore } from "@/store/useGrammarStore";
export interface GrammarError {
text: string;
message: string;
type: "spelling" | "grammar";
suggestions: string[];
}
export const useGrammarCheck = () => {
const {
errors,
isChecking,
selectedErrorIndex,
checkGrammar,
clearErrors,
selectError,
dismissError,
} = useGrammarStore();
return {
errors,
isChecking,
selectedErrorIndex,
checkGrammar,
clearErrors,
selectError,
dismissError,
};
};