18 lines
641 B
TypeScript
18 lines
641 B
TypeScript
import type { FC } from "react";
|
|
|
|
import { useAccountEventsPageVm } 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 vm = useAccountEventsPageVm();
|
|
if (vm.state === "loading") return <AccountEventsPageLoading />;
|
|
|
|
return vm.state === "error"
|
|
? <AccountEventsPageError {...vm} />
|
|
: <AccountEventsPageLoaded {...vm} />;
|
|
};
|
|
|
|
export { AccountEventsPage };
|