refactor: colocate frontend component files
Frontend security / security (push) Successful in 9s
Frontend verify / verify (push) Successful in 5m10s
Conventional commits / commits (pull_request) Successful in 25s
Frontend security / security (pull_request) Successful in 9s
Frontend verify / verify (pull_request) Successful in 5m10s
Frontend security / security (push) Successful in 9s
Frontend verify / verify (push) Successful in 5m10s
Conventional commits / commits (pull_request) Successful in 25s
Frontend security / security (pull_request) Successful in 9s
Frontend verify / verify (pull_request) Successful in 5m10s
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import type { FC } from "react";
|
||||
import { useAccountOperationsPageVm } from "./AccountOperationsPage.vm";
|
||||
import { AccountOperationsPageError } from "./components/AccountOperationsPageError.view";
|
||||
import { AccountOperationsPageLoaded } from "./components/AccountOperationsPageLoaded.view";
|
||||
import { AccountOperationsPageLoading } from "./components/AccountOperationsPageLoading.view";
|
||||
|
||||
type AccountOperationsPageProps = { accountId?: string };
|
||||
|
||||
const AccountOperationsPage: FC<AccountOperationsPageProps> = (props) => {
|
||||
const viewModel = useAccountOperationsPageVm(props.accountId);
|
||||
|
||||
if (viewModel.state === "loading") {
|
||||
return <AccountOperationsPageLoading />;
|
||||
}
|
||||
|
||||
if (viewModel.state === "error") {
|
||||
return <AccountOperationsPageError {...viewModel} />;
|
||||
}
|
||||
|
||||
return <AccountOperationsPageLoaded {...viewModel} />;
|
||||
};
|
||||
|
||||
export { AccountOperationsPage };
|
||||
Reference in New Issue
Block a user