Skip to content

Commit

Permalink
Merge pull request #2088 from jk-labs-inc/staging
Browse files Browse the repository at this point in the history
patch PR 1 of week ending 8/20/24
  • Loading branch information
Sean McCaffery authored Aug 14, 2024
2 parents cc4c46e + 22bc699 commit 5fe3a25
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ const CreateContestParams = () => {
}
};

const toggleMetadata = () => {
setMetadataToggle(!metadataToggle);
};

return (
<div className="flex flex-col">
{isMobile ? <MobileStepper currentStep={step} totalSteps={steps.length} /> : null}
Expand Down Expand Up @@ -118,17 +114,6 @@ const CreateContestParams = () => {
contestVisibility={advancedOptions.contestVisibility}
onChange={handleContestVisibilityChange}
/>
<div className="mt-4">
<button className="flex gap-4 items-center" onClick={toggleMetadata}>
<p className="text-[20px] text-positive-11">add additional fields</p>
<ChevronUpIcon
className={`w-6 h-6 text-positive-11 transition-transform duration-300 ${
metadataToggle ? "rotate-180" : ""
}`}
/>
</button>
</div>
{metadataToggle ? <ContestParamsMetadata /> : null}
</div>

<CreateNextButton step={step} onClick={() => onNextStep()} isDisabled={disableNextStep} />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import TipTapEditorControls from "@components/UI/TipTapEditorControls";
import Iframe from "@components/tiptap/Iframe";
import { ChevronUpIcon } from "@heroicons/react/24/outline";
import { useDeployContestStore } from "@hooks/useDeployContest/store";
import { Image as TipTapImage } from "@tiptap/extension-image";
import { Link as TiptapExtensionLink } from "@tiptap/extension-link";
Expand All @@ -14,6 +15,7 @@ import ErrorMessage from "../../components/Error";
import MobileStepper from "../../components/MobileStepper";
import StepCircle from "../../components/StepCircle";
import { useNextStep } from "../../hooks/useNextStep";
import ContestParamsMetadata from "../ContestParams/components/Metadata";

interface CreateEditorConfigArgs {
content: string;
Expand Down Expand Up @@ -42,7 +44,7 @@ const createEditorConfig = ({ content, placeholderText, onUpdate }: CreateEditor
});

const CreateContestPrompt = () => {
const { step, prompt, setPrompt, errors } = useDeployContestStore(state => state);
const { step, prompt, setPrompt, errors, metadataToggle, setMetadataToggle } = useDeployContestStore(state => state);
const currentStepError = errors.find(error => error.step === step);
const onNextStep = useNextStep();
const [activeEditor, setActiveEditor] = useState<Editor | null>(null);
Expand Down Expand Up @@ -103,6 +105,10 @@ const CreateContestPrompt = () => {
onFocus: () => setActiveEditor(editorContactDetails),
});

const toggleMetadata = () => {
setMetadataToggle(!metadataToggle);
};

return (
<div className="flex flex-col">
{isMobile ? <MobileStepper currentStep={step} totalSteps={steps.length} /> : null}
Expand Down Expand Up @@ -166,6 +172,15 @@ const CreateContestPrompt = () => {
/>
</div>
</div>
<button className="flex gap-4 items-center" onClick={toggleMetadata}>
<p className="text-[20px] text-positive-11">add additional fields</p>
<ChevronUpIcon
className={`w-6 h-6 text-positive-11 transition-transform duration-300 ${
metadataToggle ? "rotate-180" : ""
}`}
/>
</button>
{metadataToggle ? <ContestParamsMetadata /> : null}
<div className="mt-4">
<CreateNextButton step={step + 1} onClick={() => onNextStep()} />
</div>
Expand Down
4 changes: 2 additions & 2 deletions packages/react-app-revamp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"react-use": "17.5.1",
"react-window": "1.8.10",
"tailwind-scrollbar-hide": "1.1.7",
"tailwindcss": "3.4.9",
"tailwindcss": "3.4.10",
"ts-node": "10.9.2",
"underscore": "1.13.7",
"uuid": "10.0.0",
Expand Down Expand Up @@ -111,7 +111,7 @@
"postcss": "8.4.41",
"postcss-100vh-fix": "1.0.2",
"safe-json-utils": "1.1.1",
"tailwindcss": "3.4.9",
"tailwindcss": "3.4.10",
"tailwindcss-logical": "3.0.1",
"typescript": "5.5.4",
"webpack": "5.93.0"
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15800,10 +15800,10 @@ [email protected]:
resolve "^1.22.1"
sucrase "^3.29.0"

[email protected].9:
version "3.4.9"
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.4.9.tgz#9e04cddce1924d530df62af37d3520f0e2a9d85e"
integrity sha512-1SEOvRr6sSdV5IDf9iC+NU4dhwdqzF4zKKq3sAbasUWHEM6lsMhX+eNN5gkPx1BvLFEnZQEUFbXnGj8Qlp83Pg==
[email protected].10:
version "3.4.10"
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.4.10.tgz#70442d9aeb78758d1f911af29af8255ecdb8ffef"
integrity sha512-KWZkVPm7yJRhdu4SRSl9d4AK2wM3a50UsvgHZO7xY77NQr2V+fIrEuoDGQcbvswWvFGbS2f6e+jC/6WJm1Dl0w==
dependencies:
"@alloc/quick-lru" "^5.2.0"
arg "^5.0.2"
Expand Down

0 comments on commit 5fe3a25

Please sign in to comment.