-
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.
- Loading branch information
Showing
6 changed files
with
25 additions
and
62 deletions.
There are no files selected for viewing
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,12 +1,13 @@ | ||
import { Member } from "@/types/member"; | ||
import { Text } from "@radix-ui/themes"; | ||
import { type ReactElement } from "react"; | ||
|
||
export function MemberCard({ data }: { data: any }): ReactElement { | ||
export function MemberCard({ member }: { member: Member }): ReactElement { | ||
return ( | ||
<> | ||
<Text>Hello This page is memberCard</Text> | ||
<Text>{data.name}</Text> | ||
<Text>{data.email}</Text> | ||
<Text>{member.name}</Text> | ||
<Text>{member.email}</Text> | ||
</> | ||
); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,10 @@ | ||
import { type ReactElement } from "react"; | ||
import { List } from "@/components/List"; | ||
import { MemberCard } from "@/components/member/Card"; | ||
import SampleMember from "@/assets/members.json"; | ||
import { Member } from "@/types/member"; | ||
|
||
export function Page(): ReactElement { | ||
const membersTestData = [ | ||
{ | ||
id: 1, | ||
name: "John Doe", | ||
email: "[email protected]", | ||
}, | ||
{ | ||
id: 2, | ||
name: "Jane Doe", | ||
email: "[email protected]", | ||
}, | ||
]; | ||
return ( | ||
<List data={membersTestData}> | ||
<MemberCard data={undefined} /> | ||
</List> | ||
); | ||
const teto = SampleMember.members.at(-1) as Member; | ||
|
||
return <MemberCard member={teto}></MemberCard>; | ||
} |
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,13 @@ | ||
import { MemberCard } from "@/components/member/Card"; | ||
import { ReactElement } from "react"; | ||
import SampleMember from "@/assets/members.json"; | ||
import members from "@/assets/members.json"; | ||
import { Member } from "@/types/member"; | ||
|
||
export default function Page(): ReactElement { | ||
const teto = SampleMember.members.at(-1) as Member; | ||
|
||
if (teto == null) throw new Error("Teto not found!"); | ||
|
||
return <MemberCard member={teto}></MemberCard>; | ||
} |