mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-17 23:12:23 +00:00
refactor(header): convert default exports to named exports for buttons and language selector
This commit is contained in:
parent
547c458a20
commit
bc541fc605
@ -12,7 +12,7 @@ import { Check, Copy } from "lucide-react";
|
|||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { useProblemEditor } from "@/hooks/use-problem-editor";
|
import { useProblemEditor } from "@/hooks/use-problem-editor";
|
||||||
|
|
||||||
export default function CopyButton() {
|
export function CopyButton() {
|
||||||
const { editor } = useProblemEditor();
|
const { editor } = useProblemEditor();
|
||||||
const [copied, setCopied] = useState(false);
|
const [copied, setCopied] = useState(false);
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ import { Paintbrush } from "lucide-react";
|
|||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { useProblemEditor } from "@/hooks/use-problem-editor";
|
import { useProblemEditor } from "@/hooks/use-problem-editor";
|
||||||
|
|
||||||
export default function FormatButton() {
|
export function FormatButton() {
|
||||||
const { editor } = useProblemEditor();
|
const { editor } = useProblemEditor();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import CopyButton from "./copy-button";
|
import { CopyButton } from "./copy-button";
|
||||||
import RedoButton from "./redo-button";
|
import { RedoButton } from "./redo-button";
|
||||||
import UndoButton from "./undo-button";
|
import { UndoButton } from "./undo-button";
|
||||||
import ResetButton from "./reset-button";
|
import { ResetButton } from "./reset-button";
|
||||||
import FormatButton from "./format-button";
|
import { FormatButton } from "./format-button";
|
||||||
import LanguageSelector from "./language-selector";
|
import { LanguageSelector } from "./language-selector";
|
||||||
|
|
||||||
interface WorkspaceEditorHeaderProps {
|
interface WorkspaceEditorHeaderProps {
|
||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function WorkspaceEditorHeader({
|
export function WorkspaceEditorHeader({
|
||||||
className,
|
className,
|
||||||
...props
|
...props
|
||||||
}: WorkspaceEditorHeaderProps) {
|
}: WorkspaceEditorHeaderProps) {
|
||||||
|
Loading…
Reference in New Issue
Block a user