@@ -94,13 +94,22 @@ const BountyDetails = () => {
9494 }
9595 ) ;
9696 if ( response && response . status === 200 ) {
97+ console . log ( response ) ;
98+ setSubmissionLink (
99+ `https://octasol.io/profile/${ user . login } /submission/${ response . data . response . id } `
100+ ) ;
101+
97102 if ( submitted ) return toast . success ( "Application Updated Successfully" ) ;
98103 else {
99104 setSubmitted ( true ) ;
100105 return toast . success ( "Application Submitted Successfully" ) ;
101106 }
102107 }
103108
109+ useEffect ( ( ) => {
110+ console . log ( submissionLink ) ;
111+ } , [ submissionLink ] ) ;
112+
104113 if ( error && error . status === 401 ) {
105114 return toast . error ( "You are not authorized to submit this bounty" ) ;
106115 }
@@ -112,11 +121,9 @@ const BountyDetails = () => {
112121 if ( submissions . length > 0 ) {
113122 submissions . forEach ( ( item : any ) => {
114123 if ( item . githubId == user . githubId ) {
115- setSubmissionLink (
116- `https://octasol.io/profile/${ user . login } /submission/${ item . id } `
117- ) ;
118124 setSubmitted ( true ) ;
119125 console . log ( item ) ;
126+
120127 setSubmission ( item ) ;
121128 }
122129 } ) ;
@@ -127,10 +134,6 @@ const BountyDetails = () => {
127134 if ( id ) getBounty ( id ) ;
128135 } , [ id , user ] ) ;
129136
130- useEffect ( ( ) => {
131- console . log ( submission ) ;
132- } , [ submission ] ) ;
133-
134137 useEffect ( ( ) => {
135138 if ( id !== null ) {
136139 getSubmissions ( parseInt ( id . toString ( ) ) ) ;
@@ -164,7 +167,7 @@ const BountyDetails = () => {
164167 < >
165168 { bounty ? (
166169 < div className = "w-full h-full flex" >
167- < div className = "w-full flex flex-col md:flex-row " >
170+ < div className = "w-full flex flex-col md:flex-row gap-3 md:gap-0 " >
168171 < div className = "w-full md:max-w-[400px] flex flex-col h-full md:h-[90vh] relative md:sticky top-0 px-4" >
169172 < div className = "w-full h-min flex flex-col items-start py-5 px-4 md:px-8 gap-4 bg-[#0f0f0f] rounded-xl " >
170173 < p className = " underline underline-offset-4 font-bold" >
0 commit comments