-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathProfileViewer.tsx
More file actions
42 lines (35 loc) · 1.4 KB
/
ProfileViewer.tsx
File metadata and controls
42 lines (35 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { useSession, CombinedDataProvider, Image, LogoutButton, Text } from "@inrupt/solid-ui-react";
import { Button, Card, CardActionArea, CardContent, Container, Typography } from "@material-ui/core";
import { FOAF, VCARD } from "@inrupt/lit-generated-vocab-common";
const ProfileViewer = () => {
const { session } = useSession();
return (
<Container fixed>
{session.info.webId ? (
<CombinedDataProvider
datasetUrl={session.info.webId}
thingUrl={session.info.webId}>
<Card style={{ maxWidth: 480 }}>
<CardContent>
<Typography gutterBottom variant="h5" component="h2">
<Text property={FOAF.name.iri.value} />
</Typography>
<Typography variant="body2" color="textSecondary" component="p" style={{ display: "flex", alignItems: "center" }}>
<Text property={VCARD.organization_name.iri.value} />
</Typography>
</CardContent>
<CardActionArea style={{ justifyContent: "center", display: "flex" }}>
<Image property={VCARD.hasPhoto.iri.value} width={480} />
</CardActionArea>
</Card>
</CombinedDataProvider>
): null }
<LogoutButton >
<Button style={{ marginTop: 20 }} variant="contained" color="primary">
Logout
</Button>
</LogoutButton>
</Container>
);
}
export default ProfileViewer