Team could be created before a challenge or a Challenge could created before a Team

I have this problem. If the user first creates a challenge then on the challenge page I want to give the user an option to create a team but that team will get that challenge automatically.

But if the user creates the team first then I need to show a list of challenges on the team page that team can join in. the routes have to work both ways I think.

How should I solve this kind of loop?

Thanks :smile:

Not sure this is applicable here, but if there are no challenges yet available on the team page (which means that the challenges collection is empty), then all you do is put a message: “No challenges yet; click here to add a new challenge” which ‘click here’ is a link to the new challenge function.