-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #227 from hackdays-io/issue/198-aowheel
Issue/198 aowheel
- Loading branch information
Showing
10 changed files
with
477 additions
and
79 deletions.
There are no files selected for viewing
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
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,41 @@ | ||
import { HStack, Image, Text, VStack } from "@chakra-ui/react"; | ||
import { useNavigate } from "@remix-run/react"; | ||
import { FC } from "react"; | ||
import { HatsDetailSchama } from "types/hats"; | ||
import { RoleIcon } from "../icon/RoleIcon"; | ||
import CommonButton from "../common/CommonButton"; | ||
|
||
interface MyRoleProps { | ||
detail?: HatsDetailSchama; | ||
imageUri?: string; | ||
address?: `0x${string}`; | ||
treeId?: string; | ||
hatId?: `0x${string}`; | ||
} | ||
|
||
export const MyRole: FC<MyRoleProps> = (params) => { | ||
const { address, detail, imageUri, treeId, hatId } = params; | ||
|
||
const navigate = useNavigate(); | ||
|
||
return ( | ||
<HStack w="full" gap={5}> | ||
<RoleIcon size="130px" roleImageUrl={imageUri} /> | ||
<VStack alignItems="start" width="full"> | ||
<Text textStyle="xl">{detail?.data.name}</Text> | ||
<CommonButton | ||
onClick={() => navigate(`/${treeId}/${hatId}/${address}`)} | ||
> | ||
See Detail | ||
</CommonButton> | ||
<CommonButton | ||
onClick={() => | ||
navigate(`/${treeId}/${hatId}/${address}/assistcredit/send`) | ||
} | ||
> | ||
Transfer Assist Credit | ||
</CommonButton> | ||
</VStack> | ||
</HStack> | ||
); | ||
}; |
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,25 @@ | ||
import { HStack, Text, VStack } from "@chakra-ui/react"; | ||
import { FC } from "react"; | ||
import { HatsDetailSchama } from "types/hats"; | ||
import { RoleIcon } from "../icon/RoleIcon"; | ||
|
||
interface BasicRoleProps { | ||
detail?: HatsDetailSchama; | ||
imageUri?: string; | ||
bgColor?: string; | ||
} | ||
|
||
export const RoleTag: FC<BasicRoleProps> = ({ | ||
detail, | ||
imageUri, | ||
bgColor = "yellow.400", | ||
}) => { | ||
return ( | ||
<HStack rounded="md" backgroundColor={bgColor} gap={1}> | ||
<RoleIcon size="30px" roleImageUrl={imageUri} borderRadius="md" /> | ||
<Text pl={1} pr={2}> | ||
{detail?.data?.name} | ||
</Text> | ||
</HStack> | ||
); | ||
}; |
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,23 @@ | ||
import { Text, VStack } from "@chakra-ui/react"; | ||
import { FC } from "react"; | ||
import { HatsDetailSchama } from "types/hats"; | ||
import { RoleIcon } from "../icon/RoleIcon"; | ||
|
||
interface BasicRoleProps { | ||
detail?: HatsDetailSchama; | ||
imageUri?: string; | ||
iconSize?: number | `${number}px` | "full"; | ||
} | ||
|
||
export const VRole: FC<BasicRoleProps> = ({ | ||
detail, | ||
imageUri, | ||
iconSize = "130px", | ||
}) => { | ||
return ( | ||
<VStack> | ||
<RoleIcon size={iconSize} roleImageUrl={imageUri} /> | ||
<Text>{detail?.data?.name}</Text> | ||
</VStack> | ||
); | ||
}; |
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
Oops, something went wrong.