Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed src/assets/idle1.png
Binary file not shown.
Binary file removed src/assets/idle10.png
Binary file not shown.
Binary file removed src/assets/idle2.png
Binary file not shown.
Binary file removed src/assets/idle3.png
Binary file not shown.
Binary file removed src/assets/idle4.png
Binary file not shown.
Binary file removed src/assets/idle5.png
Binary file not shown.
Binary file removed src/assets/idle6.png
Binary file not shown.
Binary file removed src/assets/idle7.png
Binary file not shown.
Binary file removed src/assets/idle8.png
Binary file not shown.
Binary file removed src/assets/idle9.png
Binary file not shown.
15 changes: 12 additions & 3 deletions src/components/FeedbackForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ export interface FeedbackData {
}

interface FeedbackFormProps {
onContinue?: (data: FeedbackData) => void;
onContinue?: (data: FeedbackData) => void | Promise<void>;
isPreparingGame?: boolean;
}

export default function FeedbackForm({
onContinue,
isPreparingGame = false,
}: FeedbackFormProps) {
const [name, setName] = useState("");
const [sid, setSid] = useState("");
Expand Down Expand Up @@ -93,6 +95,10 @@ export default function FeedbackForm({
* Later this can be connected to the Dino game/session
* without changing the form validation itself.
*/
try {
localStorage.setItem("rpec_dino_fb_v2", JSON.stringify(feedbackData));
} catch(e) {}

if (onContinue) {
onContinue(feedbackData);
} else {
Expand Down Expand Up @@ -350,9 +356,12 @@ export default function FeedbackForm({
{/* Continue */}
<button
type="submit"
className="w-full rounded-md bg-primary px-6 py-3 text-sm font-medium text-primary-foreground transition-opacity hover:opacity-90"
disabled={isPreparingGame}
className="w-full rounded-md bg-primary px-6 py-3 text-sm font-medium text-primary-foreground transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60"
>
Continue →
{isPreparingGame
? "Preparing Game..."
: "Continue →"}
</button>
</form>
);
Expand Down
Loading
Loading