Skip to content

Commit

Permalink
Debug for SearchName.js.
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwenmichael committed Oct 15, 2021
1 parent 56356da commit 6b99174
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 8 deletions.
16 changes: 16 additions & 0 deletions frontend/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,21 @@ footer {
max-height: calc(100vh - 430px);
min-height: 100px;
overflow: auto;
overflow-x: hidden;
text-align: center;

margin: auto;
margin-top: 50px;
position: absolute;
left: 0;
right: 0;
}
.search-results-1 {
width: 500px;
max-height: calc(100vh - 630px);
min-height: 100px;
overflow: auto;
overflow-x: hidden;
text-align: center;

margin: auto;
Expand All @@ -310,6 +325,7 @@ footer {
right: 0;
}


.requests-list-received {
width: 300px;
background-color: cornflowerblue;
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/Components/Dashboard/Dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
width: 90%;
background-color: white;
border-style: solid;
height: calc(100vh - 450px);
height: 40vh;
overflow: auto;
text-align: left;
display: inline-block;
Expand All @@ -16,7 +16,7 @@
width: 90%;
background-color: white;
border-style: solid;
height: calc(100vh - 450px);
height: 40vh;
overflow-x: hidden;
text-align: left;
display: inline-block;
Expand Down Expand Up @@ -110,7 +110,7 @@
overflow-x: hidden;
overflow-y: auto;
width: 100%;
height: calc(100vh - 110px);
height: 84vh;
background: white;
/* white-space: nowrap; */
/* margin: 0px;
Expand Down Expand Up @@ -207,7 +207,7 @@
width: 70%;
height: 16vw;
display: block;
margin-top: 10%;
margin-top: 5%;
border-radius: 50%;
align-items: center;
align-content: center;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/Components/Profiles/ProfileDisplay.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
align-items: center;
font-size: var(--profile-median-font);
color: #32325d;
background-color: #fff ;
background-color: rgba(255, 255, 255, 0.705) ;
padding-left: 10px;
padding-top: 5px;
padding-bottom: 5px;
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/Components/SearchUser/searchResult.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ class SearchResult extends Component {
size="lg"
onClick={this.props.onClick}
>
<i className="fa fa-user-circle fa-fw"></i>
{user.icon && user.icon !== "" ? (
<i className={user.icon} />
) : (
<i className="fa fa-user fa-fw" />
)}
{" " + user.first_name + " " + user.last_name + " " + user.email}
</Button>
</span>
Expand Down
8 changes: 6 additions & 2 deletions frontend/src/Components/SearchUser/searchUser.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,16 @@ class SearchUser extends Component {
* @returns display the search results
*/
searchResults() {
const { results } = this.state;
const { results, detailed } = this.state;
if (results.length === 0) {
return <h1 className="not-found">None match</h1>;
} else {
var result_name = "search-results"
if(detailed){
result_name = "search-results-1"
}
return (
<div className="search-results">
<div className={result_name}>
{results.map((user) => (
<SearchResult
key={user.id}
Expand Down

0 comments on commit 6b99174

Please sign in to comment.