From 1a46d0d3c55f109c7507c3f3b9bacfb38a822387 Mon Sep 17 00:00:00 2001 From: Alexander Grattan Date: Fri, 26 Jul 2024 13:10:15 -0400 Subject: [PATCH] fix: remove AnimatePresence from prompt --- apps/client/src/components/game/prompt.tsx | 159 ++++++++++----------- 1 file changed, 77 insertions(+), 82 deletions(-) diff --git a/apps/client/src/components/game/prompt.tsx b/apps/client/src/components/game/prompt.tsx index 0e8402b..8ce63de 100644 --- a/apps/client/src/components/game/prompt.tsx +++ b/apps/client/src/components/game/prompt.tsx @@ -8,8 +8,8 @@ import { useRef, useState, } from "react"; -import { AnimatePresence, motion } from "framer-motion"; -import { EventFrom, StateFrom } from "xstate"; +import { motion } from "framer-motion"; +import type { EventFrom, StateFrom } from "xstate"; import toast from "react-hot-toast"; import { FiHelpCircle, FiX } from "react-icons/fi"; import useSound from "use-sound"; @@ -220,21 +220,17 @@ const Prompt = ({ return (
- - -

- Question {stage === "FIRST" ? 1 : 2}/2 -

-

- {currQuestion ? currQuestion.text : null} -

-
-
+ +

Question {stage === "FIRST" ? 1 : 2}/2

+

+ {currQuestion ? currQuestion.text : null} +

+
- - {!imagesLoaded && ( + {!imagesLoaded && ( + <>
@@ -297,8 +292,68 @@ const Prompt = ({
- )} -
+ +
+ +

+ In Artificial Unintelligence, you can imagine any sort of + fantastical scene and create a depiction of it by entering in a + textual description of what the image should contain, known as a + "prompt." +

+
+

+ Here are some suggestions on how to get started writing a prompt + of your own: +

+
    +
  1. + The basis for a good prompt requires at least one subject + (nouns) and a couple of descriptors (adjectives and adverbs){" "} + + + (source) + + + . An example prompt could be "A dog breathing blue fire + onto a plate of chicken nuggets." +
  2. +
  3. + To further enhance an image, try adding "aesthetic" + words to your prompt. These can be keywords like + "cinematic,""renaissance painting," or + "vaporwave"{" "} + + + (source) + + + . We can add an aesthetic word to our previous prompt so that + it says, "A dog breathing blue fire onto a plate of + chicken nuggets, cinematic." +
  4. +
  5. + Try not to overdo the description, you can only input a + maximum of 400 characters (about 60 words) since this is the + max the image generator allows. +
  6. +
+ +
+
+ + )} {imagesLoaded && (

{imagePrompt}

@@ -331,66 +386,6 @@ const Prompt = ({
)} - -
- -

- In Artificial Unintelligence, you can imagine any sort of - fantastical scene and create a depiction of it by entering in a - textual description of what the image should contain, known as a - "prompt." -

-
-

- Here are some suggestions on how to get started writing a prompt of - your own: -

-
    -
  1. - The basis for a good prompt requires at least one subject (nouns) - and a couple of descriptors (adjectives and adverbs){" "} - - - (source) - - - . An example prompt could be "A dog breathing blue fire onto - a plate of chicken nuggets." -
  2. -
  3. - To further enhance an image, try adding "aesthetic" - words to your prompt. These can be keywords like - "cinematic,""renaissance painting," or - "vaporwave"{" "} - - - (source) - - - . We can add an aesthetic word to our previous prompt so that it - says, "A dog breathing blue fire onto a plate of chicken - nuggets, cinematic." -
  4. -
  5. - Try not to overdo the description, you can only input a maximum of - 400 characters (about 60 words) since this is the max the image - generator allows. -
  6. -
- -
-
); };