@@ -3,17 +3,17 @@ import React, { ChangeEvent, useEffect, useState } from "react";
33import {
44 Box ,
55 Button ,
6+ Dialog ,
7+ DialogContent ,
8+ DialogTitle ,
69 Grid ,
10+ IconButton ,
11+ Link ,
712 Pagination ,
813 Stack ,
914 Tab ,
1015 Tabs ,
1116 Typography ,
12- Link ,
13- IconButton ,
14- DialogTitle ,
15- DialogContent ,
16- Dialog ,
1717} from "@mui/material" ;
1818import EditIcon from "@mui/icons-material/Edit" ;
1919import { useParams , useSearchParams } from "react-router-dom" ;
@@ -28,7 +28,7 @@ import { fetchFolderPath } from "../../actions/folder";
2828
2929import { a11yProps , TabPanel } from "../tabs/TabComponent" ;
3030import FilesTable from "../files/FilesTable" ;
31- import { LicenseOption , MetadataIn } from "../../openapi/v2" ;
31+ import { MetadataIn } from "../../openapi/v2" ;
3232import { DisplayMetadata } from "../metadata/DisplayMetadata" ;
3333import { DisplayListenerMetadata } from "../metadata/DisplayListenerMetadata" ;
3434import { EditMetadata } from "../metadata/EditMetadata" ;
@@ -51,18 +51,13 @@ import ShareIcon from "@mui/icons-material/Share";
5151import BuildIcon from "@mui/icons-material/Build" ;
5252import { ExtractionHistoryTab } from "../listeners/ExtractionHistoryTab" ;
5353import { SharingTab } from "../sharing/SharingTab" ;
54- import RoleChip from "../auth/RoleChip" ;
5554import { TabStyle } from "../../styles/Styles" ;
5655import { ErrorModal } from "../errors/ErrorModal" ;
5756import { Visualization } from "../visualizations/Visualization" ;
5857import VisibilityIcon from "@mui/icons-material/Visibility" ;
5958import config from "../../app.config" ;
6059import { EditLicenseModal } from "./EditLicenseModal" ;
61- import { V2 } from "../../openapi" ;
62- import {
63- fetchStandardLicenses ,
64- fetchStandardLicenseUrl ,
65- } from "../../utils/licenses" ;
60+ import { fetchStandardLicenseUrl } from "../../utils/licenses" ;
6661import { authCheck } from "../../utils/common" ;
6762
6863export const Dataset = ( ) : JSX . Element => {
@@ -143,6 +138,13 @@ export const Dataset = (): JSX.Element => {
143138 ) ;
144139 const adminMode = useSelector ( ( state : RootState ) => state . user . adminMode ) ;
145140 const license = useSelector ( ( state : RootState ) => state . dataset . license ) ;
141+ const deletedFile = useSelector (
142+ ( state : RootState ) => state . dataset . deletedFile
143+ ) ;
144+ const deletedFolder = useSelector (
145+ ( state : RootState ) => state . dataset . deletedFolder
146+ ) ;
147+
146148 const [ standardLicenseUrl , setStandardLicenseUrl ] = useState < string > ( "" ) ;
147149 const fetchStandardLicenseUrlData = async ( license_id : string ) => {
148150 try {
@@ -170,6 +172,16 @@ export const Dataset = (): JSX.Element => {
170172 getMetadatDefinitions ( null , 0 , 100 ) ;
171173 } , [ searchParams , adminMode , about . license_id ] ) ;
172174
175+ useEffect ( ( ) => {
176+ fetchFoldersFilesInDataset (
177+ datasetId ,
178+ folderId ,
179+ ( currPageNum - 1 ) * limit ,
180+ limit
181+ ) ;
182+ listDatasetAbout ( datasetId ) ;
183+ } , [ deletedFile , deletedFolder ] ) ;
184+
173185 // for breadcrumb
174186 useEffect ( ( ) => {
175187 // for breadcrumb
0 commit comments