Skip to content

Commit

Permalink
Update energy onboarding modal
Browse files Browse the repository at this point in the history
  • Loading branch information
olehmell committed Dec 7, 2023
1 parent e8ab596 commit bd603a8
Showing 1 changed file with 21 additions and 23 deletions.
44 changes: 21 additions & 23 deletions src/components/onboarding/OnBoardingModal/steps/Energy/Energy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ import OnBoardingContentContainer from '../../OnBoardingContentContainer'
import { OnBoardingContentProps } from '../../types'
import styles from './Energy.module.sass'

const { TabPane } = Tabs
// const { TabPane } = Tabs

type Tabs = 'burn-sub' | 'free-energy'
const getTabKey = (key: Tabs) => key
// const getTabKey = (key: Tabs) => key

export default function Energy({ ...props }: OnBoardingContentProps) {
const {
energy: { status },
} = useAuth()
const openState = useOnBoardingModalOpenState()
const [selectedTab, setSelectedTab] = useState<Tabs>(
const [selectedTab] = useState<Tabs>(
'burn-sub' // !balance.isZero() ? 'burn-sub' : 'free-energy',
)
const [isDisabled, setIsDisabled] = useState(false)
Expand All @@ -48,33 +48,31 @@ export default function Energy({ ...props }: OnBoardingContentProps) {
hideSubmitBtn={withoutSubmitButton}
>
<div className={styles.Energy}>
<Tabs
className={styles.EnergyTab}
centered
activeKey={selectedTab}
onChange={tab => setSelectedTab(tab as Tabs)}
>
<TabPane tab='Create Energy' key={getTabKey('burn-sub')}>
<EnergyForm
bordered={false}
className={styles.EnergyForm}
forSelfOnly
subscribeValues={{
setIsDisabled,
setAmount: amount => saveInputtedSubAmt(amount ?? 0),
amount: inputtedSubAmt,
noButton: true,
}}
/>
</TabPane>
{/*<Tabs*/}
{/* className={styles.EnergyTab}*/}
{/* centered*/}
{/* activeKey={selectedTab}*/}
{/* onChange={tab => setSelectedTab(tab as Tabs)}*/}
{/*>*/}
<EnergyForm
bordered={false}
className={styles.EnergyForm}
forSelfOnly
subscribeValues={{
setIsDisabled,
setAmount: amount => saveInputtedSubAmt(amount ?? 0),
amount: inputtedSubAmt,
noButton: true,
}}
/>
{/*<TabPane tab='Get Free Energy' key={getTabKey('free-energy')}>*/}
{/* <EnergyDiscordInstruction*/}
{/* withWaitStep*/}
{/* className='FontNormal'*/}
{/* onDiscordLinkClick={() => setIsDiscordLinkClicked(true)}*/}
{/* />*/}
{/*</TabPane>*/}
</Tabs>
{/*</Tabs>*/}
</div>
</OnBoardingContentContainer>
)
Expand Down

0 comments on commit bd603a8

Please sign in to comment.