Skip to content

Commit

Permalink
Merge branch 'dms/refactor-playground-1' into dms/refactor-playground-2
Browse files Browse the repository at this point in the history
  • Loading branch information
dschlabach committed Nov 15, 2024
2 parents 1420019 + 388cd15 commit dd240c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group';
import { useContext } from 'react';
import { useState } from 'react';
import { AppContext } from '../AppProvider';
import { CheckoutTypes, OnchainKitComponent } from '@/types/onchainkit';
import { CheckoutTypes } from '@/types/onchainkit';

export function CheckoutOptions() {
const {
activeComponent,
checkoutTypes,
setCheckoutTypes,
checkoutOptions,
Expand All @@ -24,7 +23,7 @@ export function CheckoutOptions() {
chargeId: '',
});

return activeComponent === OnchainKitComponent.Checkout ? (
return (
<div className="grid gap-2">
<Label htmlFor="chain">Checkout Types</Label>
<RadioGroup
Expand Down Expand Up @@ -95,7 +94,5 @@ export function CheckoutOptions() {
</div>
)}
</div>
) : (
<></>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ import {
} from '@/components/ui/select';
import { useContext } from 'react';
import { AppContext } from '../AppProvider';
import { OnchainKitComponent, TransactionTypes } from '@/types/onchainkit';
import { TransactionTypes } from '@/types/onchainkit';

export function TransactionOptions() {
const { activeComponent, transactionType, setTransactionType } =
useContext(AppContext);
const { transactionType, setTransactionType } = useContext(AppContext);

return activeComponent === OnchainKitComponent.Transaction ||
activeComponent === OnchainKitComponent.TransactionDefault ? (
return (
<div className="grid gap-2">
<Label htmlFor="chain">Transaction Options</Label>
<Select
Expand Down Expand Up @@ -45,7 +43,5 @@ export function TransactionOptions() {
</SelectContent>
</Select>
</div>
) : (
<></>
);
}

0 comments on commit dd240c6

Please sign in to comment.