import { useUserInfo } from "../widgets/dashboard/BaseAuthenticatedPage";
import { MainMessageWidget } from "../widgets/messages/MainMessagesWidget";
import { NotLinkedAccountMessage } from "../widgets/NotLinkedAccountMessage";

export function HomeRoute(): React.ReactElement {
  const user = useUserInfo();

  if (!user.info.matrix_account_connected) return <NotLinkedAccountMessage />;

  return <MainMessageWidget />;
}
