index.tsx 778 B

123456789101112131415161718192021222324252627282930
  1. import { useNavigate } from "react-router";
  2. import { useAppSelector } from "../../../hooks";
  3. import { currentUser } from "../../../reducers/current-user";
  4. import GroupList from "../../../features/group/GroupList";
  5. const Widget = () => {
  6. const user = useAppSelector(currentUser);
  7. const studioName = user?.realName;
  8. const navigate = useNavigate();
  9. console.debug("channel list", studioName);
  10. return (
  11. <>
  12. <title>Team Space</title>
  13. <GroupList
  14. studioName={studioName}
  15. onSelect={(id) => {
  16. const url = `/workspace/team/${id}`;
  17. navigate(url);
  18. }}
  19. onSetting={(id) => {
  20. const url = `/workspace/team/${id}/setting`;
  21. navigate(url);
  22. }}
  23. />
  24. </>
  25. );
  26. };
  27. export default Widget;