Skip to content

Commit

Permalink
Remove redundant JSX
Browse files Browse the repository at this point in the history
Replace `Text` with `TextMd`
  • Loading branch information
kpyszkowski committed May 6, 2024
1 parent ec08744 commit 37bc226
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
15 changes: 4 additions & 11 deletions dapp/src/pages/OverviewPage/GrantedSeasonPassCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import {
CardBody,
CardHeader,
CardProps,
Text,
HStack,
Icon,
} from "@chakra-ui/react"
import { IconDiscountCheckFilled, IconLock } from "@tabler/icons-react"
import { TextMd } from "#/components/shared/Typography"

type GrantedSeasonPassCardProps = CardProps & {
heading: string
Expand All @@ -21,26 +21,19 @@ export default function GrantedSeasonPassCard(

return (
<Card size="md" px={5} py={4} gap={4} {...restProps}>
<CardHeader
as={HStack}
spacing={1}
alignItems="normal"
fontWeight="bold"
p={0}
>
<Text>{heading}</Text>
<CardHeader as={HStack} spacing={1} alignItems="normal" p={0}>
<TextMd fontWeight="bold">{heading}</TextMd>
<Icon as={IconLock} boxSize={5} />
</CardHeader>
<CardBody
as={HStack}
spacing={2}
alignItems="center"
color="green.400"
fontWeight="semibold"
p={0}
>
<Icon as={IconDiscountCheckFilled} boxSize={5} />
<Text>Your seat is secured.</Text>
<TextMd fontWeight="semibold">Your seat is secured.</TextMd>
</CardBody>
</Card>
)
Expand Down
6 changes: 0 additions & 6 deletions dapp/src/pages/OverviewPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,8 @@ import Statistics from "./Statistics"
import TransactionHistory from "./TransactionHistory"
import { DocsCard } from "./DocsCard"
import { ActivityCarousel } from "./ActivityCarousel"
import GrantedSeasonPassCard from "./GrantedSeasonPassCard"

export default function OverviewPage() {
return (
<Flex direction="column" p={6}>
<GrantedSeasonPassCard heading="Season 2: tururu" />
</Flex>
)
return (
<Flex direction="column" p={6}>
<HStack pb={3.5}>
Expand Down

0 comments on commit 37bc226

Please sign in to comment.