mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-17 23:12:23 +00:00
25 lines
706 B
TypeScript
25 lines
706 B
TypeScript
|
"use client";
|
||
|
|
||
|
import { Redo2 } from "lucide-react";
|
||
|
import { useTranslations } from "next-intl";
|
||
|
import { TooltipButton } from "@/components/tooltip-button";
|
||
|
import { useProblemEditorActions } from "@/features/problems/code/hooks/use-problem-editor-actions";
|
||
|
|
||
|
const RedoButton = () => {
|
||
|
const t = useTranslations("WorkspaceEditorHeader.RedoButton");
|
||
|
const { canExecute, handleRedo } = useProblemEditorActions();
|
||
|
|
||
|
return (
|
||
|
<TooltipButton
|
||
|
tooltipContent={t("TooltipContent")}
|
||
|
onClick={handleRedo}
|
||
|
aria-label={t("TooltipContent")}
|
||
|
disabled={!canExecute}
|
||
|
>
|
||
|
<Redo2 size={16} strokeWidth={2} aria-hidden="true" />
|
||
|
</TooltipButton>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export { RedoButton };
|