Skip to content

Commit

Permalink
remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
noryev committed Jul 8, 2022
1 parent 0d978a6 commit 4f45a6b
Showing 1 changed file with 4 additions and 46 deletions.
50 changes: 4 additions & 46 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,52 +23,6 @@ import "./App.css"; // Don't forget to port this css file too, if you want the r
/**
* @type {IFPSResponse}
*/
// const mockIPFSResponse = {
// Entries: [
// {
// Hash: "QmcAm5PngkrfB5Ajea5kKAWE5d6VSpKKTYaKZNULgAPXWv",
// Name: "first.png",
// Size: 768403,
// Type: 0,
// },
// {
// Hash: "QmcAm5PngkrfB5Ajea5kKAWE5d6VSpKKTYaKZNULgAPXWv",
// Name: "second.jpeg",
// Size: 0,
// Type: 0,
// },
// {
// Hash: "QmcAm5PngkrfB5Ajea5kKAWE5d6VSpKKTYaKZNULgAPXWv",
// Name: "third.pdf",
// Size: 1768403,
// Type: 0,
// },
// {
// Hash: "QmcAm5PngkrfB5Ajea5kKAWE5d6VSpKKTYaKZNULgAPXWv",
// Name: "folder",
// Size: 3768403,
// Type: 0,
// },
// {
// Hash: "QmcAm5PngkrfB5Ajea5kKAWE5d6VSpKKTYaKZNULgAPXWv",
// Name: "folder2",
// Size: 3768403,
// Type: 0,
// },
// {
// Hash: "QmcAm5PngkrfB5Ajea5kKAWE5d6VSpKKTYaKZNULgAPXWv",
// Name: "file.jpeg",
// Size: 3768403,
// Type: 0,
// },
// {
// Hash: "QmcAm5PngkrfB5Ajea5kKAWE5d6VSpKKTYaKZNULgAPXWv",
// Name: "file.pdf",
// Size: 1768403,
// Type: 0,
// },
// ],
// };

// ************************ Graph Utility ************************
// NOTE: This section should be moved to utility file for cleaner code.
Expand Down Expand Up @@ -124,7 +78,9 @@ const transformIPFSResponse = (data) => {
};

function App() {

// IPFS Response data

/** @type {[IPFSResponse, React.Dispatch<IPFSResponse>]} */
const [IPFSFiles, setIPFSFiles] = useState(null);

Expand Down Expand Up @@ -154,6 +110,7 @@ function App() {
}, [updateDimensions]);

// Updates the size of the graph according to the size of the window.

useEffect(() => {
// Debounce resize event to avoid firing too many state updates due to resize events.
window.addEventListener("resize", updateDimensions);
Expand All @@ -163,6 +120,7 @@ function App() {
}, [updateDimensions]);

// You can do something like this for getting data from the IPFS API.

useEffect(() => {
function getIPFSFiles() {
fetch("http://127.0.0.1:5001/api/v0/files/ls?long=true", {
Expand Down

0 comments on commit 4f45a6b

Please sign in to comment.