Skip to content

Commit

Permalink
fix - added alert for no submissions
Browse files Browse the repository at this point in the history
  • Loading branch information
JianLoong committed Jul 5, 2023
1 parent 5165caf commit bd1b0df
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/ViewSubmissions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import ViewSubmission from "./ViewSubmission";

import "react-datepicker/dist/react-datepicker.css";
import Introduction from "./Introduction";
import ShowAlert from "./ShowAlert";

const fetcher = (url: string) => fetch(url).then((res) => res.json());

Expand Down Expand Up @@ -203,7 +204,10 @@ export default function ViewSubmissions() {
</div>
</div>
</form>
{submissions}
{
submissions.length === 0? <ShowAlert payload={"There are no submissions for this criteria."} type={"warning"} /> : submissions
}

</div>
);
}

0 comments on commit bd1b0df

Please sign in to comment.