diff --git a/tutify/src/components/CourseView/ViewCourse.js b/tutify/src/components/CourseView/ViewCourse.js index 1cdcbe98..315c453a 100644 --- a/tutify/src/components/CourseView/ViewCourse.js +++ b/tutify/src/components/CourseView/ViewCourse.js @@ -224,7 +224,7 @@ render() { } ))} - {this.state.profileType === "tutor" + {this.state.profileType === "tutor" && this.state.files.length !== 0 ? : diff --git a/tutify/src/components/ProfilePage/Studentdocs.js b/tutify/src/components/ProfilePage/Studentdocs.js index edafc8af..3e222970 100644 --- a/tutify/src/components/ProfilePage/Studentdocs.js +++ b/tutify/src/components/ProfilePage/Studentdocs.js @@ -283,7 +283,7 @@ class Studentdocs extends React.Component { ) }) } - {this.props.match.params.studentid !== undefined + {this.props.match.params.studentid !== undefined && this.state.files.length !== 0 ? : diff --git a/tutify/src/components/TutorProfile/DocList.js b/tutify/src/components/TutorProfile/DocList.js index cccf9a44..74d4e24b 100644 --- a/tutify/src/components/TutorProfile/DocList.js +++ b/tutify/src/components/TutorProfile/DocList.js @@ -161,8 +161,12 @@ class DocList extends React.Component { ) })} - + {this.state.files.length !== 0 + ? + : +
+ }