Skip to content

Commit

Permalink
Merge pull request #34 from ryo-manba/front-next-bug
Browse files Browse the repository at this point in the history
フロントエンド側でyarn buildを成功させる。[WIP]
  • Loading branch information
rakushoo committed Oct 26, 2022
2 parents 72b4705 + a62a41c commit 014b710
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Grid } from '@mui/material';
import { createContext, useMemo, useEffect } from 'react';
import usePlayStateStore, {
import {
usePlayStateStore,
stateNothing,
stateWaiting,
statePlaying,
} from '../store/PlayState';
import { ClientSocket } from '../../ClientSocket';
} from '../../../store/game/home/PlayState';
import { ClientSocket } from '../../../store/game/ClientSocket';
import { Start } from './Start';
import { Play } from './Play';
import { Wait } from './Wait';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState, useCallback, useEffect, useContext } from 'react';
import useOpponentStore from '../store/Opponent';
import { useOpponentStore } from '../../../store/game/home/Opponent';
import { Context } from './Display';

export const Play = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import VideogameAssetSharpIcon from '@mui/icons-material/VideogameAssetSharp';
import { Button, Grid, TextField } from '@mui/material';
import React, { useContext, useRef } from 'react';
import usePlayStateStore, { stateWaiting } from '../store/PlayState';
import {
usePlayStateStore,
stateWaiting,
} from '../../../store/game/home/PlayState';
import { Context } from './Display';

export const Start = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { CircularProgress, Grid } from '@mui/material';
import { useContext, useEffect } from 'react';
import useOpponentStore from '../store/Opponent';
import usePlayStateStore, { statePlaying } from '../store/PlayState';
import { useOpponentStore } from '../../../store/game/home/Opponent';
import {
usePlayStateStore,
statePlaying,
} from '../../../store/game/home/PlayState';
import { Context } from './Display';

export const Wait = () => {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions frontend/pages/game/home/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { NextPage } from 'next';
import { Layout } from './components/Layout';
import { Display } from './components/Display';
import { Layout } from '../../../components/game/home/Layout';
import { Display } from '../../../components/game/home/Display';

const Home: NextPage = () => {
return (
Expand Down
3 changes: 0 additions & 3 deletions frontend/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import type { NextPage } from 'next';
// import Head from 'next/head';
// import Image from 'next/image';
// import styles from '../styles/Home.module.css';
import { Stack, Button } from '@mui/material';

const Home: NextPage = () => {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ type State = {
updateOpponent: (payload: string) => void;
};

const useOpponentStore = create<State>((set) => ({
export const useOpponentStore = create<State>((set) => ({
opponent: '',
updateOpponent: (payload) => {
set({
opponent: payload,
});
},
}));

export default useOpponentStore;
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type State = {
updatePlayState: (payload: PlayState) => void;
};

const usePlayStateStore = create<State>((set) => ({
export const usePlayStateStore = create<State>((set) => ({
playState: stateNothing,
updatePlayState: (payload) =>
set({
Expand All @@ -23,4 +23,3 @@ const usePlayStateStore = create<State>((set) => ({
}));

export { stateNothing, stateWaiting, statePlaying, type PlayState };
export default usePlayStateStore;

0 comments on commit 014b710

Please sign in to comment.