Skip to content
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

Conversation

teodorazhelyazkova
Copy link
Contributor

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:

1

Testing

Steps to test

  1. Login as normal user
  2. Visit http://localhost:3040/campaigns/application

Copy link

github-actions bot commented Jul 3, 2024

✅ Tests will run for this PR. Once they succeed it can be merged.

const [activeStep, setActiveStep] = useState<Steps>(Steps.ORGANIZER)

const initialValues: CampaignApplicationFormData = useMemo(
Copy link
Member

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.

Copy link
Contributor Author

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)
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, done

@sashko9807 sashko9807 added the run tests Allows running the tests workflows for forked repos label Jul 10, 2024
@github-actions github-actions bot removed the run tests Allows running the tests workflows for forked repos label Jul 10, 2024
@sashko9807 sashko9807 merged commit fc91dd0 into podkrepi-bg:master Jul 10, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants