-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: prefill campaign application organizer form values from current user (Epic #1842) #1874
feat: prefill campaign application organizer form values from current user (Epic #1842) #1874
Conversation
✅ Tests will run for this PR. Once they succeed it can be merged. |
const [activeStep, setActiveStep] = useState<Steps>(Steps.ORGANIZER) | ||
|
||
const initialValues: CampaignApplicationFormData = useMemo( |
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.
useMemo isn't really needed for this case
We don't do any calculations here.
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.
Okay, removed
import Layout from '../layout/Layout' | ||
import CampaignApplicationForm from './CampaignApplicationForm' | ||
|
||
export default function CampaignApplicationPage() { | ||
const { data: session } = useSession() | ||
const { data: person, isLoading } = useViewPersonByKeylockId(session?.user?.sub as string) |
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.
Check useCurrentPerson hook, should do the exact same job.
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.
Yep, done
Prefill campaign application organizer form values from current user as requested in the following task https://github.com/users/gparlakov/projects/1/views/1?pane=issue&itemId=68583764
*Connected to Epic #1842
Screenshots:
Testing
Steps to test
http://localhost:3040/campaigns/application