Files
MatrixGW/matrixgw_frontend/src/routes/HomeRoute.tsx

23 lines
653 B
TypeScript

import { MatrixSyncApi } from "../api/MatrixSyncApi";
import { AsyncWidget } from "../widgets/AsyncWidget";
import { useUserInfo } from "../widgets/dashboard/BaseAuthenticatedPage";
import { NotLinkedAccountMessage } from "../widgets/NotLinkedAccountMessage";
export function HomeRoute(): React.ReactElement {
const user = useUserInfo();
if (!user.info.matrix_account_connected) return <NotLinkedAccountMessage />;
return (
<p>
Todo home route{" "}
<AsyncWidget
loadKey={1}
errMsg="Failed to start sync thread!"
load={MatrixSyncApi.Start}
build={() => <>sync started</>}
/>
</p>
);
}