3
3
import React , { useEffect , useState } from "react" ;
4
4
import { useSupabaseClient , useSession } from "@supabase/auth-helpers-react" ;
5
5
import { useActivePlanet } from "@/context/ActivePlanet" ;
6
- import { useProfileContext } from "@/context/UserProfile" ;
7
- import { ClassificationOutput } from "./ClassificationResults" ;
8
- // import IntroduceUserToResearch from "../../(scenes)/chapters/(onboarding)/initialiseResearch";
9
6
10
7
import {
11
8
zoodexSouthCoastFaunaRecovery ,
@@ -26,15 +23,7 @@ import { useRouter } from "next/navigation";
26
23
import { Button } from "antd" ;
27
24
import Link from "next/link" ;
28
25
// import UserAvatar, { UserAvatarNullUpload } from "@/components/Profile/Avatar";
29
-
30
- interface ClassificationFormProps {
31
- anomalyType : string ;
32
- anomalyId : string ;
33
- missionNumber : number ;
34
- assetMentioned : string | string [ ] ;
35
- originatingStructure ?: number ;
36
- structureItemId ?: number ;
37
- }
26
+ import { ClassificationFormProps } from "./FormConfigurations" ;
38
27
39
28
const ClassificationForm : React . FC < ClassificationFormProps > = ( {
40
29
anomalyType,
@@ -330,31 +319,6 @@ const ClassificationForm: React.FC<ClassificationFormProps> = ({
330
319
router . refresh ( ) ;
331
320
} ;
332
321
333
- const [ showModal , setShowModal ] = useState ( true ) ;
334
-
335
- const closeModal = ( ) => {
336
- setShowModal ( false ) ;
337
- } ;
338
-
339
- if ( postSubmitted ) {
340
- < Button
341
- className = "bg-[#5FCBC3] text-[#2E3440] rounded-md hover:bg-[#85DDA2]"
342
- >
343
- < Link href = '/' >
344
- Return
345
- </ Link >
346
- </ Button >
347
- } ;
348
-
349
- // if (postSubmitted && showResearch) {
350
- // return (
351
- // {showModal && <IntroduceUserToResearch closeModal={closeModal} /> }
352
- // );
353
- // if (postSubmitted) {
354
- // return <ClassificationOutput configuration={classificationOutput} />;
355
- // };
356
- // };
357
-
358
322
const addMedia = async ( e : React . ChangeEvent < HTMLInputElement > ) => {
359
323
const files = e . target . files ;
360
324
if ( files && files . length > 0 && session ) {
@@ -440,11 +404,11 @@ const ClassificationForm: React.FC<ClassificationFormProps> = ({
440
404
441
405
return (
442
406
< div className = "p-4 w-full max-w-4xl mx-auto rounded-lg h-full bg-[#2C4F64]/30 text-white bg-clip-padding backdrop-filter backdrop-blur-md bg-opacity-70" >
443
- { uses !== null && uses <= 0 ? (
407
+ { /* { uses !== null && uses <= 0 ? (
444
408
<div className="text-red-500 font-bold">
445
409
You need to repair the structure's durability before you can use it.
446
410
</div>
447
- ) : (
411
+ ) : ( */ }
448
412
< div className = "flex flex-col gap-6" >
449
413
{ classificationOptions . length > 0 ? (
450
414
< >
@@ -559,7 +523,7 @@ const ClassificationForm: React.FC<ClassificationFormProps> = ({
559
523
</ div >
560
524
) }
561
525
</ div >
562
- ) }
526
+ { /* )} */ }
563
527
</ div >
564
528
) ;
565
529
} ;
0 commit comments