mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-06 01:08:21 +01:00
fix bug: plans page show an error if admin dont create any plans
This commit is contained in:
parent
334d8ce055
commit
c9f20ddc03
@ -186,6 +186,9 @@ const PlansList: React.FC<PlansListProps> = ({ onError, onPlanSelection, onLogin
|
|||||||
* Render the provided list of categories, with each associated plans
|
* Render the provided list of categories, with each associated plans
|
||||||
*/
|
*/
|
||||||
const renderPlansByCategory = (plans: Map<number, Array<Plan>>): ReactNode => {
|
const renderPlansByCategory = (plans: Map<number, Array<Plan>>): ReactNode => {
|
||||||
|
if (!plans) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<div className="list-of-categories">
|
<div className="list-of-categories">
|
||||||
{Array.from(plans).sort(compareCategories).map(([categoryId, plansByCategory]) => {
|
{Array.from(plans).sort(compareCategories).map(([categoryId, plansByCategory]) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user