Skip to content

Commit 0aeaebf

Browse files
committed
client(LinePopup.tsx): add a random function that generates a random tech name every time the popup gets opened
1 parent b2c040d commit 0aeaebf

File tree

11 files changed

+51
-19
lines changed

11 files changed

+51
-19
lines changed

client/build/asset-manifest.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/build/index.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/build/static/css/main.a0ab9242.css

Lines changed: 0 additions & 4 deletions
This file was deleted.

client/build/static/css/main.a0ab9242.css.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

client/build/static/css/main.ca9b3525.css

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/build/static/css/main.ca9b3525.css.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/build/static/js/main.cede583c.js renamed to client/build/static/js/main.44218d5e.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/build/static/js/main.cede583c.js.map renamed to client/build/static/js/main.44218d5e.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/src/components/popups/LinePopup.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import SecondaryButton from "../buttons/SecondaryButton";
66
import Input from "../input/Input";
77
import ColorInput from "../input/ColorInput";
88
import { validateHex, validateIconAndLabel } from "../../utils/validate";
9-
import { generateHex } from "../../utils/generate";
9+
import { generateHex, getRandomTechnology } from "../../utils/generate";
1010

1111
interface LinePopupProps {
1212
isActive: boolean;
@@ -23,8 +23,10 @@ const LinePopup: FC<LinePopupProps> = (props) => {
2323
useEffect(() => {
2424
if (props.isActive) {
2525
setColor(generateHex());
26-
setIcon("react");
27-
setLabel("react");
26+
27+
const rand = getRandomTechnology();
28+
setIcon(rand);
29+
setLabel(rand);
2830
}
2931
}, [props.isActive]);
3032

0 commit comments

Comments
 (0)