From fc88d4d950e4cfad96102267d1ec7c0042ed78f2 Mon Sep 17 00:00:00 2001 From: 9308233900 Date: Sat, 17 Apr 2021 00:12:57 -0700 Subject: orientation completed --- react-frontend/src/components/HubList.js | 1 + react-frontend/src/components/Modal.js | 70 ++++++++++++++++++++++++++++++ react-frontend/src/components/landing.html | 10 +++++ 3 files changed, 81 insertions(+) create mode 100644 react-frontend/src/components/Modal.js create mode 100644 react-frontend/src/components/landing.html (limited to 'react-frontend/src/components') diff --git a/react-frontend/src/components/HubList.js b/react-frontend/src/components/HubList.js index f5b1414..5736e89 100644 --- a/react-frontend/src/components/HubList.js +++ b/react-frontend/src/components/HubList.js @@ -39,6 +39,7 @@ function HubList(props) { setName(''); } + // React hook that updates when the hubs are recalculated useEffect(() => updateHubItems(), [props.data]); diff --git a/react-frontend/src/components/Modal.js b/react-frontend/src/components/Modal.js new file mode 100644 index 0000000..3ce5d39 --- /dev/null +++ b/react-frontend/src/components/Modal.js @@ -0,0 +1,70 @@ +import { useEffect, useState } from "react"; + +import '../css/Modal.css'; + + +function Modal() { + + const [count, setCount] = useState(0); + + const nextModal1 = () => { + setCount(1); + } + const nextModal2 = () => { + setCount(2); + } + const nextModal3 = () => { + setCount(3); + } + const nextModal4 = () => { + setCount(4); + } + const startModal = () => { + document.getElementById("main-modal").style.display = 'block'; + setCount(0); + } + const exitModal = () => { + document.getElementById("main-modal").style.display = 'none'; + } + + + return ( +
+
+ {(count == 0) &&

+

Welcome to WatchDogs!

+

Click start for an introduction to the WatchDogs interface.

+

+

+

} + {(count == 1) &&

+

+ This is the suspicion ranking pane, which displays + high-profile traders and the suspicion score our algorithm assigned + to them. The higher an individual is ranked, the more likely they are involved in insider trading. +

+

} + {(count == 2) &&

+

+ The Timeframe pane + allows you to chose the timespan you'd like to see trade data from. Individuals' suspicion score will + be calculated based on the trades that occured during the timeframe you select. +

+

+

} + {count == 3 &&

+

+ The Trader Graph + shows how traders are related. Click on a name in the graph to see more information about that individual. +

+

} + {count == 4 &&

+ +

} +
+ +
+ ); +} + +export default Modal; \ No newline at end of file diff --git a/react-frontend/src/components/landing.html b/react-frontend/src/components/landing.html new file mode 100644 index 0000000..8b33b5c --- /dev/null +++ b/react-frontend/src/components/landing.html @@ -0,0 +1,10 @@ + + + + + WatchDogLanding + + +

Hello welcome to watchdog

+ + -- cgit v1.2.3-70-g09d2