1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-20 12:02:22 +03:00

More components reuse

This commit is contained in:
Quentin Gliech
2022-11-16 15:14:40 +01:00
parent 8f4873b535
commit 408a7ba363
11 changed files with 102 additions and 66 deletions

View File

@@ -13,8 +13,11 @@
// limitations under the License.
import { graphql, usePaginationFragment } from "react-relay";
import Block from "./Block";
import BlockList from "./BlockList";
import Button from "./Button";
import OAuth2Session from "./OAuth2Session";
import { Title } from "./Typography";
import { OAuth2SessionList_user$key } from "./__generated__/OAuth2SessionList_user.graphql";
@@ -43,13 +46,13 @@ const OAuth2SessionList: React.FC<Props> = ({ user }) => {
);
return (
<div>
<h2 className="text-lg">List of OAuth 2.0 sessions:</h2>
<BlockList>
<Title>List of OAuth 2.0 sessions:</Title>
{data.oauth2Sessions.edges.map((n) => (
<OAuth2Session key={n.cursor} session={n.node} />
))}
{hasNext && <Button onClick={() => loadNext(2)}>Load more</Button>}
</div>
</BlockList>
);
};