diff --git a/playwright-tests/tests/create.spec.js b/playwright-tests/tests/create.spec.js index 7de764f5c..804676b01 100644 --- a/playwright-tests/tests/create.spec.js +++ b/playwright-tests/tests/create.spec.js @@ -176,4 +176,4 @@ test.describe("Admin is connected", () => { ); expect(protectedToken).toBeTruthy(); }); -}); \ No newline at end of file +}); diff --git a/src/devhub/page/create.jsx b/src/devhub/page/create.jsx index 944c2a487..127740edb 100644 --- a/src/devhub/page/create.jsx +++ b/src/devhub/page/create.jsx @@ -15,6 +15,30 @@ if (!context.accountId) { ); } +const postTypeOptions = { + Idea: { + name: "Idea", + icon: "bi-lightbulb", + + description: + "Get feedback from the community about a problem, opportunity, or need.", + }, + + Solution: { + name: "Solution", + icon: "bi-rocket", + + description: + "Provide a specific proposal or implementation to an idea, optionally requesting funding. If your solution relates to an existing idea, please reply to the original post with a solution.", + }, +}; + +const typeSwitch = (optionName) => { + State.update({ + postType: optionName, + }); +}; + function initLabels() { const labels = []; if (props.labels) { @@ -481,43 +505,33 @@ return ( What do you want to create?
- {state.postType === "Idea" - ? "Get feedback from the community about a problem, opportunity, or need." - : "Provide a specific proposal or implementation to an idea, optionally requesting funding. If your solution relates to an existing idea, please reply to the original post with a solution."} + {postTypeOptions[state.postType].description}
{state.warning && (