Skip to content

feat(PM-578): Apply for copilot opportunity #1067

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

Merged
merged 7 commits into from
May 9, 2025
Merged

feat(PM-578): Apply for copilot opportunity #1067

merged 7 commits into from
May 9, 2025

Conversation

hentrymartin
Copy link
Collaborator

Related JIRA Ticket:

https://topcoder.atlassian.net/browse/PM-578

What's in this PR?

  • Added the functionality in copilots opportunity details page to apply for opportunity
  • The button is visible only for copilots

const [notes, setNotes] = useState('')
const [success, setSuccess] = useState(false);

const onApply = useCallback(async () => {
Copy link

Choose a reason for hiding this comment

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

Consider adding error handling for the applyCopilotOpportunity function call to manage any potential failures or exceptions that might occur during the API request.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@hentrymartin please wrap the applyCopilotOpportunity in try/catch block to avoid calling props.onApplied() & setSuccess(true) if the API call fails for some reason.

@hentrymartin hentrymartin requested a review from kkartunov May 6, 2025 21:28
const [notes, setNotes] = useState('')
const [success, setSuccess] = useState(false);

const onApply = useCallback(async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

@hentrymartin please wrap the applyCopilotOpportunity in try/catch block to avoid calling props.onApplied() & setSuccess(true) if the API call fails for some reason.

@hentrymartin
Copy link
Collaborator Author

@kkartunov I've updated the PR based on your comments, can you please have a look on it again?

Copy link
Collaborator

@kkartunov kkartunov left a comment

Choose a reason for hiding this comment

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

Looks good.

@hentrymartin hentrymartin merged commit 233712b into dev May 9, 2025
3 checks passed
@hentrymartin hentrymartin deleted the pm-578 branch May 9, 2025 15:41
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