Ver Fonte

commmit

andifebri há 3 anos atrás
pai
commit
d0ea894527
1 ficheiros alterados com 3 adições e 3 exclusões
  1. 3 3
      pages/app/pelaporan/search.js

+ 3 - 3
pages/app/pelaporan/search.js

@@ -127,14 +127,14 @@ class Search extends Component {
 					</div>
 				</div>
 				<Row>
-					<Col lg={this.props.user.role.id === 2021 ? 12 : 9}>
+					<Col lg={this.props.user?.role.id === 2021 ? 12 : 9}>
 						<div className="form-group mb-4">
 							<input className="form-control mb-2" type="text" id="searchInput" placeholder="Pencarian Nama Perguruan Tinggi" />
 							<div className="d-flex">
 								<button className="btn btn-secondary" type="button" onClick={(e) => this.handleSearchClick()}>
 									Search
 								</button>
-								<div className="ml-auto">{this.props.user.role.id === 2021 && `Pembina: ${this.props.user.lembaga.nama}`}</div>
+								<div className="ml-auto">{this.props.user?.role.id === 2021 && `Pembina: ${this.props.user.lembaga.nama}`}</div>
 							</div>
 						</div>
 						<div className="card card-default">
@@ -153,7 +153,7 @@ class Search extends Component {
 							</div>
 						</div>
 					</Col>
-					{this.props.user.role.id === 2021 ? (
+					{this.props.user?.role.id === 2021 ? (
 						""
 					) : (
 						<Col lg="3">