Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
dschlabach committed Nov 14, 2024
1 parent 6d6b334 commit a81e59f
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions playground/nextjs-app-router/components/demo/Checkout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
import type { LifecycleStatus } from '@coinbase/onchainkit/checkout';
import { useCallback, useMemo } from 'react';
import { useContext } from 'react';
import { AppContext, CheckoutTypes } from '../AppProvider';

import { AppContext } from '../AppProvider';
import { CheckoutTypes } from '@/types/onchainkit';
export default function CheckoutDemo() {
const { checkoutTypes, checkoutOptions, isSponsored } =
useContext(AppContext);
Expand Down
3 changes: 2 additions & 1 deletion playground/nextjs-app-router/components/demo/Transaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import {
} from '@coinbase/onchainkit/transaction';
import { useCallback, useContext, useEffect, useMemo } from 'react';
import type { ContractFunctionParameters } from 'viem';
import { AppContext, TransactionTypes } from '../AppProvider';
import { AppContext } from '../AppProvider';
import { TransactionTypes } from '@/types/onchainkit';

function TransactionDemo() {
const { chainId, transactionType, isSponsored } = useContext(AppContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { useCapabilities } from '@/lib/hooks';
import { clickCalls, clickContracts } from '@/lib/transactions';
import { TransactionDefault } from '@coinbase/onchainkit/transaction';
import { useCallback, useContext, useEffect } from 'react';
import { AppContext, TransactionTypes } from '../AppProvider';
import { AppContext } from '../AppProvider';
import { TransactionTypes } from '@/types/onchainkit';

export default function TransactionDefaultDemo() {
const { chainId, transactionType } = useContext(AppContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import {
SelectValue,
} from '@/components/ui/select';
import { useContext } from 'react';
import { AppContext, OnchainKitComponent } from '../AppProvider';
import { AppContext } from '../AppProvider';
import { OnchainKitComponent } from '@/types/onchainkit';

export function ActiveComponent() {
const { activeComponent, setActiveComponent } = useContext(AppContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { Label } from '@/components/ui/label';
import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group';
import { useContext } from 'react';
import { useState } from 'react';
import { AppContext, CheckoutTypes, OnchainKitComponent } from '../AppProvider';
import { AppContext } from '../AppProvider';
import { CheckoutTypes, OnchainKitComponent } from '@/types/onchainkit';

export function CheckoutOptions() {
const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from '@/components/ui/select';
import { useContext } from 'react';
import { AppContext } from '../AppProvider';
import type { ComponentMode as ComponentModeReact } from '../AppProvider';
import type { ComponentMode as ComponentModeReact } from '@/types/onchainkit';

export function ComponentMode() {
const { componentMode, setComponentMode } = useContext(AppContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from '@/components/ui/select';
import { useContext } from 'react';
import { AppContext } from '../AppProvider';
import type { ComponentTheme as ComponentThemeType } from '../AppProvider';
import type { ComponentTheme as ComponentThemeType } from '@/types/onchainkit';

export function ComponentTheme() {
const { componentTheme, setComponentTheme } = useContext(AppContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ import {
SelectValue,
} from '@/components/ui/select';
import { useContext } from 'react';
import {
AppContext,
OnchainKitComponent,
TransactionTypes,
} from '../AppProvider';
import { AppContext } from '../AppProvider';
import { OnchainKitComponent, TransactionTypes } from '@/types/onchainkit';

export function TransactionOptions() {
const { activeComponent, transactionType, setTransactionType } =
Expand Down

0 comments on commit a81e59f

Please sign in to comment.