Spaces:
Sleeping
Sleeping
add callbacks
Browse files
src/components/ui-controls.tsx
CHANGED
|
@@ -15,6 +15,18 @@ export const UIControls = () => {
|
|
| 15 |
rubiksCubeRef?.current?.rotate(scrambleSteps);
|
| 16 |
};
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
return (
|
| 19 |
<div className="z-10 pointer-events-none">
|
| 20 |
<Card className="max-w-sm bg-white/30 border border-white/80 backdrop-blur-xl pointer-events-auto">
|
|
@@ -51,12 +63,14 @@ export const UIControls = () => {
|
|
| 51 |
<div className="flex flex-col gap-2">
|
| 52 |
<div className="flex gap-2">
|
| 53 |
<Button onPress={scramble}>Scramble</Button>
|
| 54 |
-
<Button>Reset</Button>
|
| 55 |
-
<Button className="ms-auto" color="success">
|
| 56 |
Solve
|
| 57 |
</Button>
|
| 58 |
</div>
|
| 59 |
-
<div className="text-sm italic font-bold underline text-primary cursor-pointer"
|
|
|
|
|
|
|
| 60 |
</div>
|
| 61 |
</CardBody>
|
| 62 |
</Card>
|
|
|
|
| 15 |
rubiksCubeRef?.current?.rotate(scrambleSteps);
|
| 16 |
};
|
| 17 |
|
| 18 |
+
const reset = () => {
|
| 19 |
+
alert('Working on it!');
|
| 20 |
+
};
|
| 21 |
+
|
| 22 |
+
const solve = () => {
|
| 23 |
+
alert('Working on it!');
|
| 24 |
+
};
|
| 25 |
+
|
| 26 |
+
const train = () => {
|
| 27 |
+
alert('Working on it!');
|
| 28 |
+
};
|
| 29 |
+
|
| 30 |
return (
|
| 31 |
<div className="z-10 pointer-events-none">
|
| 32 |
<Card className="max-w-sm bg-white/30 border border-white/80 backdrop-blur-xl pointer-events-auto">
|
|
|
|
| 63 |
<div className="flex flex-col gap-2">
|
| 64 |
<div className="flex gap-2">
|
| 65 |
<Button onPress={scramble}>Scramble</Button>
|
| 66 |
+
<Button onPress={reset}>Reset</Button>
|
| 67 |
+
<Button className="ms-auto" color="success" onPress={solve}>
|
| 68 |
Solve
|
| 69 |
</Button>
|
| 70 |
</div>
|
| 71 |
+
<div className="text-sm italic font-bold underline text-primary cursor-pointer" onClick={train}>
|
| 72 |
+
Train my own model!
|
| 73 |
+
</div>
|
| 74 |
</div>
|
| 75 |
</CardBody>
|
| 76 |
</Card>
|