Revert "fix(test): Rerender"

This reverts commit a017ffc3c9.
This commit is contained in:
Sidharth Vinod 2022-10-10 22:04:33 +08:00
parent 60e4585e20
commit 23e590e09b
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD
1 changed files with 3 additions and 4 deletions

View File

@ -19,10 +19,9 @@
function rerender(text) {
const graphText = `graph TD
A[${text}] -->|Get money| B(Go shopping)`;
mermaid.mermaidAPI.renderAsync('id', graphText).then((svg) => {
console.log('\x1b[35m%s\x1b[0m', '>> graph', svg);
document.getElementById('graph').innerHTML = svg;
});
const graph = mermaid.mermaidAPI.render('id', graphText);
console.log('\x1b[35m%s\x1b[0m', '>> graph', graph);
document.getElementById('graph').innerHTML = graph;
}
</script>
<button id="rerender" onclick="rerender('Saturday')">Rerender</button>