Skip to content

Commit

Permalink
Update App.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ScolderCreations authored Nov 15, 2021
1 parent 17bba83 commit d16b631
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Main } from "./components/Main";
function preventTags(str) {
return str.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;') ;
}
var showID = true
class App extends Component {
constructor(props) {
super(props);
Expand Down Expand Up @@ -86,6 +87,9 @@ class App extends Component {
onChange={(e) => this.setState({ nameSearch: e.target.value })}
></input>
</div>
<div className="form-item">
<label htmlFor="showID">Show Project ID</label>
<input type="checkbox" name="showID"></input>
</div>

<h3>Results</h3>
Expand All @@ -96,7 +100,7 @@ class App extends Component {
<table class="table">
<thead>
<tr>
<th>ID</th>
<th>{showID ? "ID" : "-"}</th>
<th>Name</th>
<th>Created</th>
<th>Modified</th>
Expand All @@ -120,8 +124,8 @@ class App extends Component {

return (
<tr key={project.id}>
<td>{project.id}</td>
<td>{preventTags(project.title)}</td>
<td>{showID ? project.id : "-"}</td>
<td>{project.title}</td>
<td>
{created.toLocaleDateString()}{" "}
{created.toLocaleTimeString()}
Expand Down

0 comments on commit d16b631

Please sign in to comment.