Skip to content

Commit

Permalink
feat: add client
Browse files Browse the repository at this point in the history
  • Loading branch information
Vivomo committed Jan 1, 2024
1 parent b11c5fd commit 478b2c1
Show file tree
Hide file tree
Showing 7 changed files with 4,196 additions and 709 deletions.
4,619 changes: 4,057 additions & 562 deletions client/pnpm-lock.yaml

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion client/src/components/DuelField/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface IDuelFieldMethod {
}


const DuelField = React.forwardRef<IDuelFieldMethod>((props: any, ref) => {
const DuelField = React.forwardRef<IDuelFieldMethod>((props: IProps, ref) => {

const { leftPlayer, rightPlayer, afterAttack } = props;
const [leftAction, setLeftAction] = useState<ActionType>('idle');
Expand Down Expand Up @@ -131,6 +131,7 @@ const DuelField = React.forwardRef<IDuelFieldMethod>((props: any, ref) => {
y={1.5}
x={5.1}
action={rightAction}
toward={'Left'}
onActionEnd={(action) => {
if (action === 'slash') {
setLeftAction('idle');
Expand Down
4 changes: 2 additions & 2 deletions client/src/mock/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ export const TreasureChestMockData: ITreasureChest[] = [
}
];

const hunterEquip = {
export const hunterEquip = {
head: 'Demon Crown',
clothes: 'Demon Husk',
handheld: 'Club'
}

const warriorEquip = {
export const warriorEquip = {
head: 'Ancient Helm',
clothes: 'Holy Chestplate',
handheld: 'Mace'
Expand Down
3 changes: 2 additions & 1 deletion client/src/pages/ffa/header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { useDojo } from "../../../DojoContext";
interface IProps {
onPlayBtnClick: () => void;
onlyRight?: boolean;
addr?: string;
}


Expand Down Expand Up @@ -56,7 +57,7 @@ const HomeHeader = (props: IProps) => {
</div>
{
walletAddress ?
<UserAddress address={walletAddress} account={walletBalance + 'ETH'}/>
<UserAddress address={props?.addr} account={walletBalance + 'ETH'}/>
:
<button className="play-btn mi-btn" onClick={props.onPlayBtnClick}>PLAY NOW</button>
}
Expand Down
Loading

0 comments on commit 478b2c1

Please sign in to comment.