Skip to content

Commit ae0f7c3

Browse files
committed
result
1 parent a175168 commit ae0f7c3

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

client/src/components/MessageForm/MessageForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type React from "react";
22
import { useState } from "react";
3-
import { getMessages, getRoomMessages, postMessage, postRooomMessage } from "../../services/messageApi";
3+
import { getMessages, getRoomMessages, postMessage, postRoomMessage } from "../../services/messageApi";
44
import './MessageForm.scss'
55
import type { Message } from "../../types/Message";
66

@@ -36,7 +36,7 @@ export const MessageForm: React.FC<Props> = ({ username, roomId, userId, setMess
3636
}
3737

3838
if (roomId) {
39-
await postRooomMessage(username, text.trim(), roomId, userId);
39+
await postRoomMessage(username, text.trim(), roomId, userId);
4040
} else {
4141
await postMessage(username, text.trim(), userId);
4242
}

client/src/components/Rooms/RoomCreateForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useState } from "react"
1+
import React, { useState } from "react"
22
import { createRoom } from "../../services/roomApi";
33
import type { Room } from "../../types/Room";
44

@@ -25,7 +25,7 @@ export const RoomCreateForm: React.FC<Props> = ({ userId, onSet, onClose }) => {
2525

2626
return (
2727
<form className="createRoom" onSubmit={handleSubmit}>
28-
<p className="createRoom__lable">Enter the name:</p>
28+
<p className="createRoom__label">Enter the name:</p>
2929
<input
3030
className="createRoom__input"
3131
type="text"

client/src/components/UserNameForm/UserForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useState } from "react"
1+
import React, { useState } from "react"
22
import './Username.scss';
33
import { saveUser } from "../../services/userApi";
44
import type { User } from "../../types/User";
@@ -26,7 +26,7 @@ export const UsernameForm: React.FC<Props> = ({ onSet }) => {
2626

2727
return (
2828
<form className="usernameForm" onSubmit={handleSubmit}>
29-
<p className="usernameForm__lable">Enter the username:</p>
29+
<p className="usernameForm__label">Enter the username:</p>
3030
<input
3131
className="usernameForm__input"
3232
type="text"

client/src/services/messageApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export async function postMessage(username: string, text: string, userId: string
1515
return response.data;
1616
}
1717

18-
export async function postRooomMessage(
18+
export async function postRoomMessage(
1919
username: string,
2020
text: string,
2121
roomId: string,

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ UserRooms.belongsTo(Room, { foreignKey: 'roomId' });
4949

5050
const startApp = async () => {
5151
try {
52-
await sequelize.sync({ force: true });
52+
await sequelize.sync();
5353

5454
const server = app.listen(PORT);
5555

0 commit comments

Comments
 (0)