diff --git a/pages/build.js b/pages/build.js index 60662ad..0ac5309 100644 --- a/pages/build.js +++ b/pages/build.js @@ -1,10 +1,76 @@ import Head from 'next/head' import Form from 'react-bootstrap/Form'; +import Table from 'react-bootstrap/Table' import { useState } from 'react'; -import { Container } from 'react-bootstrap'; +import { Container, Row, Col } from 'react-bootstrap'; export default function Home() { const [instructionStatus, setInstructionStatus] = useState([]); + + const geraTabelaParaInserirInstrucoes = (nInst) => { + let tabela = []; + for (let i = 0; i < nInst; i++) { + let d = "D" + i; + let r = "R" + i; + let s = "S" + i; + let t = "T" + i; + tabela.push( + + + + + + + + + + + + + + + ); + } + return tabela; + }; + + const handleGenerateTable = (event) => { + const nInst = event.target.value; + setInstructionStatus(geraTabelaParaInserirInstrucoes(nInst)); + }; return ( <> @@ -22,92 +88,38 @@ export default function Home() {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
+

Lista de Instruções

+
+
+ + + + + + + + + + + + + + + + + + {instructionStatus} + +
InstruçãoOperando 3Operando 2Operando 1
+ +