App.razor 766 B

1234567891011121314151617181920212223242526272829
  1. @code {
  2. public int Type { get; set; }
  3. }
  4. @switch (Type)
  5. {
  6. default:
  7. <div class="container">
  8. <h2>Simple Web Chat</h2>
  9. <div class="row m-2">
  10. <div class="col-12">
  11. <button @onclick="@(()=>Type=1)" class="btn btn-primary">Text chat</button>
  12. <button @onclick="@(()=>Type=2)" class="btn btn-primary">Voice chat</button>
  13. <button @onclick="@(()=>Type=3)" class="btn btn-primary">Voice meeting</button>
  14. </div>
  15. </div>
  16. </div>
  17. break;
  18. case 1:
  19. <TextChat></TextChat>
  20. break;
  21. case 2:
  22. <VoiceChat></VoiceChat>
  23. break;
  24. case 3:
  25. <VoiceMeeting></VoiceMeeting>
  26. break;
  27. }