Skip to content

Commit 9714dfd

Browse files
committed
🌭🪡 ↝ [SSM-66 SSG-85]: Removed some old knip files and adjusted durability standard for structures
1 parent 619fa6d commit 9714dfd

File tree

7 files changed

+28
-235
lines changed

7 files changed

+28
-235
lines changed

components/Inventory/items/MineralDeposits.tsx

-66
This file was deleted.

components/Projects/(classifications)/ClassificationResults.tsx

-124
This file was deleted.

components/Projects/(classifications)/FormConfigurations.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ export interface FormConfig {
1111
richTextTitles?: (string | undefined)[];
1212
};
1313

14-
interface ClassificationFormProps {
14+
export interface ClassificationFormProps {
1515
config?: FormConfig;
16-
onSubmit: (data: any) => void;
16+
onSubmit?: (data: any) => void;
1717
anomalyType: string;
1818
anomalyId: string;
1919
missionNumber: number;
20-
assetMentioned: string;
20+
assetMentioned: string | string[];
2121
originatingStructure?: number;
2222
structureItemId?: number;
2323
};

components/Projects/(classifications)/PostForm.tsx

+4-40
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
import React, { useEffect, useState } from "react";
44
import { useSupabaseClient, useSession } from "@supabase/auth-helpers-react";
55
import { useActivePlanet } from "@/context/ActivePlanet";
6-
import { useProfileContext } from "@/context/UserProfile";
7-
import { ClassificationOutput } from "./ClassificationResults";
8-
// import IntroduceUserToResearch from "../../(scenes)/chapters/(onboarding)/initialiseResearch";
96

107
import {
118
zoodexSouthCoastFaunaRecovery,
@@ -26,15 +23,7 @@ import { useRouter } from "next/navigation";
2623
import { Button } from "antd";
2724
import Link from "next/link";
2825
// 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";
3827

3928
const ClassificationForm: React.FC<ClassificationFormProps> = ({
4029
anomalyType,
@@ -330,31 +319,6 @@ const ClassificationForm: React.FC<ClassificationFormProps> = ({
330319
router.refresh();
331320
};
332321

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-
358322
const addMedia = async (e: React.ChangeEvent<HTMLInputElement>) => {
359323
const files = e.target.files;
360324
if (files && files.length > 0 && session) {
@@ -440,11 +404,11 @@ const ClassificationForm: React.FC<ClassificationFormProps> = ({
440404

441405
return (
442406
<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 ? (
444408
<div className="text-red-500 font-bold">
445409
You need to repair the structure's durability before you can use it.
446410
</div>
447-
) : (
411+
) : ( */}
448412
<div className="flex flex-col gap-6">
449413
{classificationOptions.length > 0 ? (
450414
<>
@@ -559,7 +523,7 @@ const ClassificationForm: React.FC<ClassificationFormProps> = ({
559523
</div>
560524
)}
561525
</div>
562-
)}
526+
{/* )} */}
563527
</div>
564528
);
565529
};

components/Projects/Auto/Mars-Photos.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import axios from "axios";
33
import { useSession, useSupabaseClient } from "@supabase/auth-helpers-react";
44
import { useActivePlanet } from "@/context/ActivePlanet";
55
import ClassificationForm from "@/components/Projects/(classifications)/PostForm";
6-
import { MapPinIcon } from "@/components/Inventory/items/MineralDeposits";
6+
import { MapPinIcon } from "@/components/ui/icons/MapPin";
77
import Spinner from "@/components/ui/Spinner";
88

99
export const RooverFromAppeears: React.FC = () => {

components/profile/Avatar.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ interface UserAvatarPropsNullUpload {
8787
size: number;
8888
}
8989

90-
export function UserAvatarNullUpload({ url, size }: UserAvatarProps) {
90+
function UserAvatarNullUpload({ url, size }: UserAvatarProps) {
9191
const supabase = useSupabaseClient();
9292
const [avatarUrl, setAvatarUrl] = useState<string | null>(null);
9393

components/ui/icons/MapPin.tsx

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
export function MapPinIcon(props: any) {
2+
return (
3+
<svg
4+
{...props}
5+
xmlns="http://www.w3.org/2000/svg"
6+
width="24"
7+
height="24"
8+
viewBox="0 0 24 24"
9+
fill="none"
10+
stroke="currentColor"
11+
strokeWidth="2"
12+
strokeLinecap="round"
13+
strokeLinejoin="round"
14+
>
15+
<path d="M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z" />
16+
<circle cx="12" cy="10" r="3" />
17+
</svg>
18+
);
19+
};

0 commit comments

Comments
 (0)