-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⛑️ Refactor apply on wg validation (#2860)
* Initial commit * Validation on pasting account address * New validation helpers * Making SelectAccount.tsx controllable * AddBountyModal update on validation helpers * Rework on stake step of ApplyForRoleModal.tsx * Rework on form step of ApplyForRoleModal.tsx * Extracting helpers to new file * Making form question component controllable * Main modal refactor * Code cleanup * Test fix
- Loading branch information
Showing
18 changed files
with
241 additions
and
337 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/ui/src/bounty/modals/AddBountyModal/components/GeneralParametersStep.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 6 additions & 5 deletions
11
packages/ui/src/working-groups/components/ApplicationQuestionInput.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
import React from 'react' | ||
|
||
import { CKEditor } from '../../common/components/CKEditor' | ||
import { CKEditor } from '@/common/components/CKEditor' | ||
|
||
import { InputComponent, InputText } from '../../common/components/forms' | ||
import { ApplicationQuestionType } from '../types' | ||
|
||
interface ApplicationQuestionInputProps { | ||
type: ApplicationQuestionType | ||
index: number | ||
question: string | ||
onChange: (value: string) => void | ||
name: string | ||
} | ||
|
||
export const ApplicationQuestionInput = ({ question, index, type, onChange }: ApplicationQuestionInputProps) => { | ||
export const ApplicationQuestionInput = ({ question, index, type, name }: ApplicationQuestionInputProps) => { | ||
const inputId = `field-${index}` | ||
|
||
return ( | ||
<InputComponent label={question} required inputSize={type === 'TEXTAREA' ? 'auto' : 'm'} id={inputId}> | ||
{type === 'TEXT' && <InputText id={inputId} onChange={(event) => onChange(event.target.value)} />} | ||
{type === 'TEXTAREA' && <CKEditor onChange={(event, editor) => onChange(editor.getData())} />} | ||
{type === 'TEXT' && <InputText id={inputId} name={name} />} | ||
{type === 'TEXTAREA' && <CKEditor name={name} />} | ||
</InputComponent> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 0 additions & 63 deletions
63
packages/ui/src/working-groups/modals/ApplyForRoleModal/ApplyForRoleApplicationStep.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
de1c6a1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
pioneer-2 – ./
pioneer-2-git-dev-joystream.vercel.app
pioneer-2-joystream.vercel.app
pioneer-2.vercel.app