Support Responsive layout (missed commit)

This commit is contained in:
Tuan Cao 2022-04-18 22:43:39 +07:00
parent d7599d0dd5
commit 96d4e9e7e7

View File

@ -57,8 +57,8 @@ const styleSheet = [{
function Graph({graph}) { function Graph({graph}) {
const [width, setWith] = useState("400px"); const [width, setWidth] = useState("300px");
const [height, setHeight] = useState("400px"); const [height, setHeight] = useState("300px");
const [graphData, setGraphData] = useState({ const [graphData, setGraphData] = useState({
nodes: graph.nodes, nodes: graph.nodes,
edges: graph.edges edges: graph.edges
@ -66,9 +66,12 @@ function Graph({graph}) {
let myCyRef; let myCyRef;
const router = useRouter() const router = useRouter()
//TODO: Listen to query change/ graphdata change to update state of this component
// Can use this: https://github.com/vercel/next.js/discussions/12661
return ( return (
<> <>
<div> <div className="right-bar-container">
<h3>Links to this notes</h3> <h3>Links to this notes</h3>
<div <div
style={{ style={{