Skip to content

Commit 51afe80

Browse files
committed
feat: add button to go to strategy editor
1 parent df30cc1 commit 51afe80

1 file changed

Lines changed: 38 additions & 19 deletions

File tree

src/components/solvers/SolverConfiguration.tsx

Lines changed: 38 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
import { Button, Flex, Tooltip } from "@chakra-ui/react";
1+
import { Button, Flex, HStack, Link, Tooltip } from "@chakra-ui/react";
22
import { useEffect, useRef, useState } from "react";
3+
import { BsArrowUpRight } from "react-icons/bs";
4+
import { FaPlay } from "react-icons/fa6";
35
import { getInvalidProblemDto } from "../../api/toolbox/data-model/ProblemDto";
46
import { toolboxApi } from "../../api/toolbox/ToolboxAPI";
57
import { StrategyProvider } from "./Graph/MetaSolverStrategyProvider";
@@ -32,24 +34,41 @@ export const SolverConfiguration = (props: SolverConfigurationProps) => {
3234
return (
3335
<Flex alignSelf="center">
3436
{problemId === null ? (
35-
<Tooltip label="Unleash the Qubits!" color="white">
36-
<Button
37-
colorScheme="teal"
38-
size="md"
39-
onClick={() => {
40-
toolboxApi
41-
.postProblem<string>(props.problemTypeId, {
42-
...getInvalidProblemDto<string>(),
43-
input: props.problemInput,
44-
})
45-
.then((problem) => {
46-
setProblemId(problem.id);
47-
});
48-
}}
49-
>
50-
Configure {props.problemTypeName} Solver
51-
</Button>
52-
</Tooltip>
37+
<HStack>
38+
<Tooltip label="Interactively configure and solve this problem using a selection of various solvers.">
39+
<Button
40+
bg="kitGreen"
41+
textColor="white"
42+
size="md"
43+
gap="5px"
44+
onClick={() => {
45+
toolboxApi
46+
.postProblem<string>(props.problemTypeId, {
47+
...getInvalidProblemDto<string>(),
48+
input: props.problemInput,
49+
})
50+
.then((problem) => {
51+
setProblemId(problem.id);
52+
});
53+
}}
54+
>
55+
<FaPlay />
56+
Configure {props.problemTypeName ?? props.problemTypeId} Solver
57+
</Button>
58+
</Tooltip>
59+
60+
<Tooltip label="Create and save a strategy what solvers to use.">
61+
<Link
62+
href={process.env.NEXT_PUBLIC_MSS_EDITOR_BASE_URL}
63+
target="_blank"
64+
>
65+
<Button bg="kitBlue" textColor="white" size="md" gap="5px">
66+
<BsArrowUpRight />
67+
Go to Strategy Editor
68+
</Button>
69+
</Link>
70+
</Tooltip>
71+
</HStack>
5372
) : (
5473
<SolverProvider>
5574
<StrategyProvider>

0 commit comments

Comments
 (0)