How to implement the proposal creation?
In the Find Job section, users can create a proposal for the job they want to apply for. We will use and detail the use of function createProposal or updateProposal
Good to Know
① Create a Form for the proposal creation
// The interface for the inupt field of your form
interface IFormValues {
about: string;
rateToken: string;
rateAmount: number;
expirationDate: number;
videoUrl: string;
}
// As we using Formik we use the validationSchema to check all the input value.
const validationSchema = Yup.object({
about: Yup.string().required('Please provide a description of your service'),
rateToken: Yup.string().required('Please select a payment token'),
rateAmount: Yup.string().required('Please provide an amount for your service'),
expirationDate: Yup.number().integer().required('Please provide an expiration date'),
});
② Handle Submit and Post the proposal
③ Get the Proposal by User With Subgraph API
See the Full Code Implemented on Our Demo DAPP
Last updated