Skip to content

Commit c8b5859

Browse files
removed type errors and typescript warnings
1 parent bfc879f commit c8b5859

5 files changed

Lines changed: 13 additions & 16 deletions

File tree

src/App.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,10 @@ function App() {
2525
const [selfLoops, setSelfLoops] = useState<boolean>(true);
2626
// State to manage the minimum number of visits for displaying edges in the graph
2727
const [minVisits, setMinVisits] = useState<number>(0);
28-
const { resetData, loading, error, setError, top5Sequences, setSelectedSequence, selectedSequence, csvData, setCSVData } = useContext(Context);
28+
const { resetData, loading, error, top5Sequences, setSelectedSequence, selectedSequence, csvData, setCSVData } = useContext(Context);
2929
const showControls = useMemo(() => {
30-
if (loading == false && csvData.length > 0) {
31-
return true;
32-
}
33-
return false;
30+
return !loading && csvData.length > 0;
31+
3432
}, [loading, csvData]);
3533

3634

@@ -44,10 +42,10 @@ function App() {
4442
}
4543

4644
};
47-
48-
const handleError = (errorMessage: string) => {
49-
setError(errorMessage);
50-
}
45+
// TODO: Implement error handling
46+
// const handleError = (errorMessage: string) => {
47+
// setError(errorMessage);
48+
// }
5149

5250
/**
5351
* Toggles the self-loops inclusion in the graph by switching the state.

src/components/DropZone.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import {ParseResult} from '@/lib/types';
44
import {parseData} from '@/lib/utils';
55
import {Label} from "@/components/ui/label"
66
import {RadioGroup, RadioGroupItem} from "@/components/ui/radio-group"
7-
7+
type TODO = any;
88
interface DropZoneProps {
9-
afterDrop: (data:string) => void,
9+
afterDrop: (data:TODO) => void,
1010
onLoadingChange: (loading: boolean) => void,
1111
onError: (error: string) => void,
1212
}

src/components/FilterComponent.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
SelectContent,
55
SelectGroup,
66
SelectItem,
7-
SelectLabel,
87
SelectTrigger,
98
SelectValue,
109
} from "@/components/ui/select"

src/components/Upload.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ interface UploadProps {
1010
// Functional component for file upload
1111
function Upload({ onDataProcessed }: UploadProps) {
1212
// Access loading state and setter from Context
13-
const { loading, setLoading } = useContext(Context);
13+
const { setLoading } = useContext(Context);
1414

1515
// Handle file upload event
1616
const handleFileUpload = (event: React.ChangeEvent<HTMLInputElement>) => {

src/first3Last3.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import Papa from 'papaparse';
2-
3-
interface CSVRow {
1+
// import Papa from 'papaparse';
2+
//
3+
export interface CSVRow {
44
'Session Id': string;
55
'Time': string;
66
'Step Name': string;

0 commit comments

Comments
 (0)