mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-29 18:52:22 +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
|
||||
*/
|
||||
const renderPlansByCategory = (plans: Map<number, Array<Plan>>): ReactNode => {
|
||||
if (!plans) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<div className="list-of-categories">
|
||||
{Array.from(plans).sort(compareCategories).map(([categoryId, plansByCategory]) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user