@@ -152,7 +23,7 @@ export default function Home() {
TrackMyApp
-
+
My Applications
@@ -163,7 +34,7 @@ export default function Home() {
)
}
-function FluffChart() {
+function FlufferChart() {
const nodes = useStore((state) => state.nodes)
const starts = useStore((state) => state.starts)
const uiMode = useUiMode()
@@ -213,95 +84,6 @@ function FluffChart() {
)
}
-function ApplicationList() {
- const entries = useStore(useShallow((state) => state.entries))
-
- return Object.values(entries).map((entry) => (
-
- ))
-}
-
-const ApplicationListItem = memo(({ entry }: { entry: Entry }) => {
- const [isAddingStage, setIsAddingStage] = useState(false)
- const inputRef = useRef
(null)
- const addStageInEntry = useStore((state) => state.addStageInEntry)
- const deleteStageInEntry = useStore((state) => state.deleteStageInEntry)
- const deleteEntry = useStore((state) => state.deleteEntry)
-
- function onOk() {
- if (inputRef.current && inputRef.current.value) {
- addStageInEntry(inputRef.current.value, entry.name)
- setIsAddingStage(false)
- }
- }
-
- function onCancel() {
- setIsAddingStage(false)
- }
-
- function onDeleteApplication() {
- if (confirm("Are you sure you want to delete this application?")) {
- deleteEntry(entry.name)
- }
- }
-
- return (
-
- {entry.name}
-
- {entry.stages.map((step) => (
- -
-
- {step}
- {step !== applicationSubmittedNode.key ? (
-
- ) : null}
-
-
- ))}
- {isAddingStage ? (
- -
-
-
- ) : null}
-
- {!isAddingStage ? (
-
-
-
-
-
-
- ) : (
-
-
-
-
- )}
-
- )
-})
-
function AddApplicationForm() {
const [isAddingEntry, setIsAddingEntry] = useState(false)
const addEntry = useStore((state) => state.addEntry)