1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-24 23:01:05 +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,10 @@
// limitations under the License.
import { graphql, usePaginationFragment } from "react-relay";
import BlockList from "./BlockList";
import BrowserSession from "./BrowserSession";
import Button from "./Button";
import { Title } from "./Typography";
import { BrowserSessionList_user$key } from "./__generated__/BrowserSessionList_user.graphql";
@@ -44,8 +46,8 @@ const BrowserSessionList: React.FC<Props> = ({ user, currentSessionId }) => {
);
return (
<div>
<h2 className="text-lg">List of browser sessions:</h2>
<BlockList>
<Title>List of browser sessions:</Title>
{data.browserSessions.edges.map((n) => (
<BrowserSession
key={n.cursor}
@@ -54,7 +56,7 @@ const BrowserSessionList: React.FC<Props> = ({ user, currentSessionId }) => {
/>
))}
{hasNext && <Button onClick={() => loadNext(2)}>Load more</Button>}
</div>
</BlockList>
);
};