Skip to content

Commit

Permalink
fixup: Move useExecutor to a mutations directory
Browse files Browse the repository at this point in the history
  • Loading branch information
amnn committed Jul 9, 2024
1 parent 2b4ed0d commit 4486b5e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions examples/tic-tac-toe/ui/src/components/NewMultiSigGame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { publicKeyFromRawBytes } from '@mysten/sui/verify';
import { ExclamationTriangleIcon } from '@radix-ui/react-icons';
import { Box, Button, Em, Flex, Separator, Spinner, Text, TextField } from '@radix-ui/themes';
import { ComputedField } from 'components/ComputedField';
import { useExecutor } from 'hooks/useExecutor';
import { useTransactions } from 'hooks/useTransactions';
import { useExecutor } from 'mutations/useExecutor';
import { ReactElement, useState } from 'react';

/**
Expand Down Expand Up @@ -67,7 +67,11 @@ export function NewMultiSigGame(): ReactElement {
/>
<Flex justify="between" mt="4">
<Validation hasPlayer={hasPlayer} hasOpponent={hasOpponent} />
<Button variant="outline" disabled={!(publicKey && opponent) || isPending} onClick={onClick}>
<Button
variant="outline"
disabled={!(publicKey && opponent) || isPending}
onClick={onClick}
>
{isPending ? <Spinner /> : null} Play
</Button>
</Flex>
Expand Down
2 changes: 1 addition & 1 deletion examples/tic-tac-toe/ui/src/components/NewSharedGame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { useCurrentAccount } from '@mysten/dapp-kit';
import { isValidSuiAddress, normalizeSuiAddress } from '@mysten/sui/utils';
import { ExclamationTriangleIcon } from '@radix-ui/react-icons';
import { Box, Button, Em, Flex, Separator, Spinner, Text, TextField } from '@radix-ui/themes';
import { useExecutor } from 'hooks/useExecutor';
import { useTransactions } from 'hooks/useTransactions';
import { useExecutor } from 'mutations/useExecutor';
import { ReactElement, useState } from 'react';

import { ComputedField } from './ComputedField';
Expand Down
2 changes: 1 addition & 1 deletion examples/tic-tac-toe/ui/src/pages/Game.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import { Board } from 'components/Board';
import { Error } from 'components/Error';
import { IDLink } from 'components/IDLink';
import { Loading } from 'components/Loading';
import { useExecutor } from 'hooks/useExecutor';
import { Game as GameData, InvalidateGameQuery, Mark, useGameQuery } from 'hooks/useGameQuery';
import { useTransactions } from 'hooks/useTransactions';
import { InvalidateTrophyQuery, Trophy, useTrophyQuery } from 'hooks/useTrophyQuery';
import { useTurnCapQuery } from 'hooks/useTurnCapQuery';
import { useExecutor } from 'mutations/useExecutor';
import { ReactElement } from 'react';

type Props = {
Expand Down

0 comments on commit 4486b5e

Please sign in to comment.