Apply JS formatting from npm prettier

This commit is contained in:
Seth Foster
2023-08-23 11:29:37 -04:00
committed by Seth Foster
parent fa0e0b2576
commit 0a87bf1b5e
3 changed files with 4 additions and 10 deletions

View File

@@ -154,7 +154,8 @@ function InstanceForm({
onSubmit={(values) => { onSubmit={(values) => {
handleSubmit({ handleSubmit({
...values, ...values,
listener_port: values.listener_port === '' ? null : values.listener_port, listener_port:
values.listener_port === '' ? null : values.listener_port,
peers: values.peers.map((peer) => peer.hostname || peer), peers: values.peers.map((peer) => peer.hostname || peer),
}); });
}} }}

View File

@@ -178,12 +178,7 @@ function MeshGraph({
mesh mesh
.append('defs') .append('defs')
.selectAll('marker') .selectAll('marker')
.data([ .data(['end', 'end-active', 'end-adding', 'end-removing'])
'end',
'end-active',
'end-adding',
'end-removing',
])
.join('marker') .join('marker')
.attr('id', String) .attr('id', String)
.attr('viewBox', '0 -5 10 10') .attr('viewBox', '0 -5 10 10')

View File

@@ -110,9 +110,7 @@ export function getRandomInt(min, max) {
const generateRandomLinks = (n, r) => { const generateRandomLinks = (n, r) => {
const links = []; const links = [];
function getRandomLinkState() { function getRandomLinkState() {
return ['established', 'adding', 'removing'][ return ['established', 'adding', 'removing'][getRandomInt(0, 3)];
getRandomInt(0, 3)
];
} }
for (let i = 0; i < r; i++) { for (let i = 0; i < r; i++) {
const link = { const link = {