Skip to content

Commit 3b509e6

Browse files
committed
Fix lint warnings
1 parent 4845744 commit 3b509e6

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

src/CreateOrJoinPage/JoinSessionSection.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import React, { useRef, useState } from "react";
1+
import React, { useState } from "react";
22
import { Button, Section, SectionTitle, Space, TextInput } from "./index";
3-
import styled from "styled-components";
43
import { useSocketEvent } from "../hooks/useSocketEvent";
54
import { SessionIdPayload } from "../../backend/interface";
65
import { useSocket } from "../SocketContext";

src/CreateOrJoinPage/index.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import React, { useState } from "react";
1+
import React from "react";
22
import styled from "styled-components";
3-
import { useSocketEvent } from "../hooks/useSocketEvent";
43
import { SessionIdPayload } from "../../backend/interface";
5-
import { useSocket } from "../SocketContext";
64
import { CreateSessionSection } from "./CreateSessionSection";
75
import { JoinSessionSection } from "./JoinSessionSection";
86

@@ -12,9 +10,8 @@ interface Props {
1210
}
1311

1412
export const CreateOrJoinPage: React.FC<Props> = ({ setSessionId }) => {
15-
const [name, setName] = useState<string>("");
16-
console.log("Create or join page");
17-
const socket = useSocket();
13+
// const [name, setName] = useState<string>("");
14+
// const socket = useSocket();
1815

1916
const sessionIdReceivedFromBackend = ({ sessionId }: SessionIdPayload) => {
2017
document.location.hash = `sessionId=${sessionId}`;
@@ -25,7 +22,7 @@ export const CreateOrJoinPage: React.FC<Props> = ({ setSessionId }) => {
2522
<Container>
2623
<h1>Create a new room or join an existing one</h1>
2724
<h2>Who are you? So the group can recognize you.</h2>
28-
<TextInput type="text" onChange={(e) => setName(e.target.value)} />
25+
<TextInput type="text" />
2926
<Space />
3027
<CreateSessionSection
3128
setSessionId={(sessionId) => {

0 commit comments

Comments
 (0)