From aa3f07d314b30704a811c80b71c431ba10853984 Mon Sep 17 00:00:00 2001 From: Adilet Baimyrza uulu Date: Mon, 13 Nov 2023 18:55:58 +0100 Subject: [PATCH 1/2] framework for testing --- .../src/components/Navbar/Navbar.jsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dijkstra-prim-visualization/src/components/Navbar/Navbar.jsx b/dijkstra-prim-visualization/src/components/Navbar/Navbar.jsx index 6517ecf..8b08c11 100644 --- a/dijkstra-prim-visualization/src/components/Navbar/Navbar.jsx +++ b/dijkstra-prim-visualization/src/components/Navbar/Navbar.jsx @@ -1,5 +1,8 @@ import { useContext } from "react"; import { GraphParamsContext } from "../../GraphParamsContext"; +import { createGraph } from "../../algorithms/graph"; +import prim from "../../algorithms/mstPrim"; +import dijkstra from "../../algorithms/spDijkstra"; /** * Navbar component displays buttons to print nodes and edges. @@ -7,8 +10,19 @@ import { GraphParamsContext } from "../../GraphParamsContext"; */ const Navbar = () => { const { nodes, edges } = useContext(GraphParamsContext); + + const runPrim = () => { + // you can run your code there + }; + + const runDijkstra = () => { + // you can run your code there + }; + return ( <> + +