-
Notifications
You must be signed in to change notification settings - Fork 10
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
Conversation
const [notes, setNotes] = useState('') | ||
const [success, setSuccess] = useState(false); | ||
|
||
const onApply = useCallback(async () => { |
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.
Consider adding error handling for the applyCopilotOpportunity
function call to manage any potential failures or exceptions that might occur during the API request.
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.
@hentrymartin please wrap the applyCopilotOpportunity in try/catch block to avoid calling props.onApplied() & setSuccess(true)
if the API call fails for some reason.
...lots/src/pages/copilot-opportunity-details/apply-opportunity-modal/ApplyOpportunityModal.tsx
Show resolved
Hide resolved
...lots/src/pages/copilot-opportunity-details/apply-opportunity-modal/ApplyOpportunityModal.tsx
Outdated
Show resolved
Hide resolved
...ps/copilots/src/pages/copilot-opportunity-details/apply-opportunity-modal/styles.module.scss
Show resolved
Hide resolved
src/apps/copilots/src/pages/copilot-opportunity-details/index.tsx
Outdated
Show resolved
Hide resolved
src/apps/copilots/src/pages/copilot-opportunity-details/index.tsx
Outdated
Show resolved
Hide resolved
src/apps/copilots/src/pages/copilot-opportunity-details/index.tsx
Outdated
Show resolved
Hide resolved
src/apps/copilots/src/pages/copilot-opportunity-details/index.tsx
Outdated
Show resolved
Hide resolved
src/apps/copilots/src/pages/copilot-opportunity-details/index.tsx
Outdated
Show resolved
Hide resolved
...lots/src/pages/copilot-opportunity-details/apply-opportunity-modal/ApplyOpportunityModal.tsx
Show resolved
Hide resolved
...lots/src/pages/copilot-opportunity-details/apply-opportunity-modal/ApplyOpportunityModal.tsx
Outdated
Show resolved
Hide resolved
...lots/src/pages/copilot-opportunity-details/apply-opportunity-modal/ApplyOpportunityModal.tsx
Show resolved
Hide resolved
...lots/src/pages/copilot-opportunity-details/apply-opportunity-modal/ApplyOpportunityModal.tsx
Show resolved
Hide resolved
...lots/src/pages/copilot-opportunity-details/apply-opportunity-modal/ApplyOpportunityModal.tsx
Show resolved
Hide resolved
src/apps/copilots/src/pages/copilot-opportunity-details/index.tsx
Outdated
Show resolved
Hide resolved
src/apps/copilots/src/pages/copilot-opportunity-details/index.tsx
Outdated
Show resolved
Hide resolved
...lots/src/pages/copilot-opportunity-details/apply-opportunity-modal/ApplyOpportunityModal.tsx
Outdated
Show resolved
Hide resolved
...lots/src/pages/copilot-opportunity-details/apply-opportunity-modal/ApplyOpportunityModal.tsx
Show resolved
Hide resolved
const [notes, setNotes] = useState('') | ||
const [success, setSuccess] = useState(false); | ||
|
||
const onApply = useCallback(async () => { |
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.
@hentrymartin please wrap the applyCopilotOpportunity in try/catch block to avoid calling props.onApplied() & setSuccess(true)
if the API call fails for some reason.
...lots/src/pages/copilot-opportunity-details/apply-opportunity-modal/ApplyOpportunityModal.tsx
Outdated
Show resolved
Hide resolved
src/apps/copilots/src/pages/copilot-opportunity-details/index.tsx
Outdated
Show resolved
Hide resolved
src/apps/copilots/src/pages/copilot-opportunity-details/index.tsx
Outdated
Show resolved
Hide resolved
...lots/src/pages/copilot-opportunity-details/apply-opportunity-modal/ApplyOpportunityModal.tsx
Show resolved
Hide resolved
@kkartunov I've updated the PR based on your comments, can you please have a look on it again? |
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.
Looks good.
Related JIRA Ticket:
https://topcoder.atlassian.net/browse/PM-578
What's in this PR?