forked from zhongyidian/food-add-edu
refactor: 横屏提示与缩放改为组件标签(OrientationGuard)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
a98b1d383e
commit
ce9567d1da
12 files changed
+50
-70
No files matched your search
@@ -6,8 +6,8 @@ import {
|
||||
Droppable,
|
||||
} from "@/components/course-interactions/drag-drop";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { useCourseCanvas } from "@/course-runtime/canvas";
|
||||
import { cn } from "@/lib/cn";
|
||||
import { useScale } from "@/utils";
|
||||
import type {
|
||||
DragDemoItem,
|
||||
DragDemoZone,
|
||||
@@ -153,7 +153,7 @@ const renderPlacedItem = (item: DragDemoItem) => (
|
||||
);
|
||||
|
||||
export function DragDropDemo() {
|
||||
const scale = useScale();
|
||||
const { scale } = useCourseCanvas();
|
||||
const [dropResult, setDropResult] = useState<DragDropDemoResult>(null);
|
||||
const [placedItemIds, setPlacedItemIds] = useState<Record<string, string[]>>(
|
||||
{},
|
||||
|
||||
Reference in new issue
Block a user