diff --git a/package.json b/package.json index 49d929d..d6a7d16 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "catchmuz", - "version": "1.0.1", + "version": "1.0.2", "private": true, "main": "public/electron.js", "homepage": "./", diff --git a/src/App.scss b/src/App.scss index 843c7fe..b6c2d78 100644 --- a/src/App.scss +++ b/src/App.scss @@ -97,30 +97,4 @@ a { 100% { opacity: 1; } -} - -.navbar { - padding-top: 3rem !important; - .navbar-menu { - font-size: 1.8rem; - margin-right: 1.5rem; - opacity: .4; - font-weight: 500; - &.active { - opacity: 1; - font-weight: 500; - position: relative; - &::before { - margin-top: -.5rem; - margin-left: calc(50% - .25rem); - position: absolute; - width: .5rem; - height: .5rem; - border-radius: .25rem; - content: " "; - white-space: pre; - background-color: #ffffffd7; - } - } - } -} \ No newline at end of file +} \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index 976ceed..dff977e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -12,19 +12,12 @@ import Setting from './pages/Setting'; import Room from './pages/Room'; import CheckRoom from './pages/CheckRoom'; -const CLIENT_VERSION = 'v1.0.1'; +import { Navbar } from './components/Navbar/Navbar'; + +const CLIENT_VERSION = 'v1.0.2'; const server_host = process.env.REACT_APP_SERVER_HOST || "localhost:4000"; const socket = io(server_host); -const NavBar = ({ path } : { path: string }) => { - return ( -
- 로비 - 설정 -
- - ) -} const App = () => { const dispatch = useDispatch(); @@ -87,13 +80,12 @@ const App = () => { } exact/> <> - @@ -101,7 +93,6 @@ const App = () => { }/> <> - }/> @@ -115,10 +106,7 @@ const App = () => { socket={ socket } /> }/> - - - }/> + ); } diff --git a/src/components/Button/Button.scss b/src/components/Button/Button.scss index 636595d..86c79bc 100644 --- a/src/components/Button/Button.scss +++ b/src/components/Button/Button.scss @@ -110,7 +110,7 @@ opacity: .75; transition: opacity ease .25s; color: $secondary; - &:hover { + &:not(:disabled):not(.disabled):hover { opacity: 1; } } diff --git a/src/components/Button/Button.tsx b/src/components/Button/Button.tsx index eb1dad7..2d018d5 100644 --- a/src/components/Button/Button.tsx +++ b/src/components/Button/Button.tsx @@ -123,14 +123,16 @@ export const ImgButton = ({ children, clicked, src, isActive = false } : ImgButt type SkipButtonProps = { className? : string, children?: React.ReactNode, + disabled? : boolean clicked? : () => void } -export const SkipButton = ({ children, clicked, className = '' } : SkipButtonProps) => { +export const SkipButton = ({ children, clicked, className = '', disabled = false } : SkipButtonProps) => { return ( - { - isSelectMe && -
- { - isManager ? - <> -

강제 퇴장 시키겠습니까?

-
- clicked(user.socketId) }>네 - selectUser('') }>취소 -
- - : - <> -

강제 퇴장은 방장만 가능합니다.

- - - } -
- } +
+ + { + isSelectMe && +
+ { + isMe ? + <> +

{ isManager ? '방장입니다' : '방장이아닙니다.' }

+ + + : + isManager ? + <> +

강제 퇴장 시키겠습니까?

+
+ clicked(user.socketId) }>네 + selectUser('') }>취소 +
+ + : + <> +

강제 퇴장은 방장만 가능합니다.

+ + + } +
+ }
) } diff --git a/src/pages/Lobby.tsx b/src/pages/Lobby.tsx index 0e6416c..dc75d59 100644 --- a/src/pages/Lobby.tsx +++ b/src/pages/Lobby.tsx @@ -5,6 +5,7 @@ import './Lobby.scss'; import { Button, PointButton } from '../components/Button/Button'; import { RoomMenu } from '../components/Room/RoomMenu'; +import { Navbar } from '../components/Navbar/Navbar'; type LobbyProps = { socket: Socket @@ -23,6 +24,7 @@ type RoomType = { const Lobby = ({ socket } : LobbyProps) => { const [roomList, setRoomList] = React.useState({}); + const [clientsCount, setClientsCount] = React.useState(1); React.useEffect(() => { getRoomList(); @@ -41,12 +43,13 @@ const Lobby = ({ socket } : LobbyProps) => { // 받아온 데이터로 방 목록을 새로고침 function refreshRoomList(data: any) { - console.log(data); - setRoomList(data); + setClientsCount(data.clientsCount); + setRoomList(data.roomList); } return (
+ {/*