-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start adding basic profile structure including first card profile. Refs: CU-8696hrm29 Signed-off-by: Jimmy <[email protected]>
- Loading branch information
Showing
4 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
frontend/src/Components/Cards/ProfileFriends/ProfileFriends.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import {Card, Grid, Group, Image, Text, UnstyledButton} from "@mantine/core"; | ||
import {DummyFriendsType} from "../../../Services/Constants/DummyUser.tsx"; | ||
|
||
export const ProfileFriends = (props: { friends: DummyFriendsType }) => { | ||
|
||
const handleButtonClick = (event) => { | ||
event.preventDefault(); | ||
|
||
window.open(event.target.href, '_blank', 'noopener,noreferrer'); | ||
} | ||
|
||
return ( | ||
<Card shadow="sm" px="lg" pt={"lg"} radius="md" w={400} withBorder> | ||
<Group justify={"space-between"} mb={15}> | ||
<Text size={"lg"}>Friends</Text> | ||
<UnstyledButton component="a" href="https://www.google.com" onClick={handleButtonClick} c="dimmed">Wyświetl | ||
wszystko</UnstyledButton> | ||
</Group> | ||
|
||
<Grid gutter={"xs"} align={"center"}> | ||
{props.friends.friendsDetails!.map((friend, index) => { | ||
return ( | ||
<Grid.Col span={4}> | ||
<Image key={index} src={friend.profilePicture} alt={"Photo " + index} w={"auto"} h={100} radius={180} | ||
fit={"contain"}/> | ||
</Grid.Col> | ||
); | ||
})} | ||
</Grid> | ||
|
||
</Card> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './ProfileFriends.tsx' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters