mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 15:26:33 +00:00
refactor(WorkspaceEditorFooter): replace useCodeEditorStore with useProblemEditor
This commit is contained in:
parent
00f83d69f1
commit
7051f57204
@ -2,17 +2,17 @@
|
|||||||
|
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { useCodeEditorStore } from "@/store/useCodeEditorStore";
|
import { useProblemEditor } from "@/hooks/use-problem-editor";
|
||||||
|
|
||||||
interface WorkspaceEditorFooterProps {
|
interface WorkspaceEditorFooterProps {
|
||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function WorkspaceEditorFooter({
|
export function WorkspaceEditorFooter({
|
||||||
className,
|
className,
|
||||||
...props
|
...props
|
||||||
}: WorkspaceEditorFooterProps) {
|
}: WorkspaceEditorFooterProps) {
|
||||||
const { editor } = useCodeEditorStore();
|
const { editor } = useProblemEditor();
|
||||||
const [position, setPosition] = useState<{ lineNumber: number; column: number } | null>(null);
|
const [position, setPosition] = useState<{ lineNumber: number; column: number } | null>(null);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user