18 lines
690 B
TypeScript
18 lines
690 B
TypeScript
import type { FC } from "react";
|
|
|
|
import { useAccountEventsPageViewModel } from "./AccountEventsPage.vm";
|
|
import { AccountEventsPageError } from "./components/AccountEventsPageError.view";
|
|
import { AccountEventsPageLoaded } from "./components/AccountEventsPageLoaded.view";
|
|
import { AccountEventsPageLoading } from "./components/AccountEventsPageLoading.view";
|
|
|
|
const AccountEventsPage: FC = () => {
|
|
const viewModel = useAccountEventsPageViewModel();
|
|
if (viewModel.state === "loading") return <AccountEventsPageLoading />;
|
|
|
|
return viewModel.state === "error"
|
|
? <AccountEventsPageError {...viewModel} />
|
|
: <AccountEventsPageLoaded {...viewModel} />;
|
|
};
|
|
|
|
export { AccountEventsPage };
|