Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix voice recorder #159

Merged
merged 27 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1a76838
✨ Feat(profile-picture): set/remove profile picture
AhmedHamdiy Nov 2, 2024
740681d
Merge branch 'dev' of github.com:TelwareSW/telware-frontend into dev
AhmedHamdiy Nov 6, 2024
68af8fc
Merge branch 'dev' of github.com:TelwareSW/telware-frontend into dev
AhmedHamdiy Nov 6, 2024
b4285da
Merge branch 'dev' of github.com:TelwareSW/telware-frontend into dev
AhmedHamdiy Nov 27, 2024
37d1d58
Merge branch 'dev' of github.com:TelwareSW/telware-frontend into dev
AhmedHamdiy Nov 29, 2024
6c972d1
Merge branch 'dev' of github.com:TelwareSW/telware-frontend into dev
AhmedHamdiy Nov 29, 2024
e096e22
Merge branch 'dev' of github.com:TelwareSW/telware-frontend into dev
AhmedHamdiy Nov 29, 2024
f6eb48e
Merge branch 'dev' of github.com:TelwareSW/telware-frontend into dev
AhmedHamdiy Nov 29, 2024
5bb6406
Merge branch 'dev' of github.com:TelwareSW/telware-frontend into dev
AhmedHamdiy Nov 29, 2024
e5dc564
Merge branch 'dev' of github.com:TelwareSW/telware-frontend into dev
AhmedHamdiy Nov 29, 2024
59331f8
Merge branch 'dev' of github.com:TelwareSW/telware-frontend into dev
AhmedHamdiy Nov 30, 2024
fa7d17c
Merge branches 'dev' and 'dev' of github.com:TelwareSW/telware-fronte…
AhmedHamdiy Nov 30, 2024
e79d7ff
Merge branch 'dev' of github.com:TelwareSW/telware-frontend into dev
AhmedHamdiy Dec 1, 2024
2d9b1ec
Merge branch 'dev' of github.com:TelwareSW/telware-frontend into dev
AhmedHamdiy Dec 2, 2024
cf84acc
Merge branch 'dev' of github.com:TelwareSW/telware-frontend into dev
AhmedHamdiy Dec 2, 2024
d5a18ee
Merge branch 'dev' of github.com:TelwareSW/telware-frontend into dev
AhmedHamdiy Dec 3, 2024
f6310e7
Merge branch 'dev' of github.com:TelwareSW/telware-frontend into dev
AhmedHamdiy Dec 6, 2024
df96002
Merge branch 'dev' of github.com:TelwareSW/telware-frontend into dev
AhmedHamdiy Dec 6, 2024
32d722c
Merge branch 'dev' of github.com:TelwareSW/telware-frontend into dev
AhmedHamdiy Dec 9, 2024
40d9dd9
Merge branch 'dev' of github.com:TelwareSW/telware-frontend into dev
AhmedHamdiy Dec 9, 2024
8685c6f
admin mock
AhmedHamdiy Dec 18, 2024
bed405a
merge
AhmedHamdiy Dec 20, 2024
8889e5c
Merge branch 'dev' of github.com:TelwareSW/telware-frontend into dev
AhmedHamdiy Dec 21, 2024
516007a
Merge branch 'dev' of github.com:TelwareSW/telware-frontend into dev
AhmedHamdiy Dec 21, 2024
5d8e3ef
fix: adjust sixing (#158)
sarah-kamall Dec 21, 2024
ae5e083
Merge branch 'dev' of github.com:TelwareSW/telware-frontend into dev
AhmedHamdiy Dec 21, 2024
0cbb1c3
fix: voice recoder
AhmedHamdiy Dec 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
4 changes: 2 additions & 2 deletions app/src/features/chats/ChatInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function ChatInput() {
isEmojiSelectorOpen,
handleSubmit,
showForwardUsers,
handleClose,
handleClose
} = useContext(ChatInputContext);

const chats = useAppSelector((state) => state.chats.chats);
Expand Down Expand Up @@ -133,7 +133,7 @@ function ChatInput() {
data-testid="send-button"
/>
) : (
<VoiceRecorder chatId={chatId} />
<VoiceRecorder />
)}
</Input>
) : (
Expand Down
10 changes: 8 additions & 2 deletions app/src/features/chats/ChatInputIcons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,25 @@ function ChatInputIcons() {
setInput,
file,
setFile,
setIsFilePreviewOpen,
setIsFilePreviewOpen
} = useContext(ChatInputContext);

const toggleShowEmojies = () => {
setIsEmojiSelectorOpen((show: boolean) => !show);
};

const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
setIsEmojiSelectorOpen(false);
if (e.key === "Enter" && !e.shiftKey) {
e.preventDefault();
handleSubmit(e as unknown as Event);
}
};
const handleSetFile = (file: File) => {
setIsEmojiSelectorOpen(false);
setFile(file);
setIsFilePreviewOpen(true);
};

return (
<>
Expand All @@ -50,7 +56,7 @@ function ChatInputIcons() {

<MediaUploadComponent
file={file}
setFile={setFile}
setFile={handleSetFile}
setIsFilePreviewOpen={setIsFilePreviewOpen}
/>
</>
Expand Down
4 changes: 2 additions & 2 deletions app/src/features/chats/ChatItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ type ChatItemProps = {

const ChatItem = ({
chat: { _id, lastMessage, name, photo },
onClick,
onClick
}: ChatItemProps) => {
const navigate = useNavigate();

Expand All @@ -86,7 +86,7 @@ const ChatItem = ({
<Timestamp data-testid="chat-timestamp">
{new Date(timestamp).toLocaleTimeString("en-US", {
hour: "2-digit",
minute: "2-digit",
minute: "2-digit"
}) || "No messages"}
</Timestamp>
</ChatHeader>
Expand Down
1 change: 0 additions & 1 deletion app/src/features/chats/Topbar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useCallback, useEffect, useState } from "react";
import { useCallback, useEffect, useState } from "react";
import { useParams } from "react-router-dom";
import styled from "styled-components";

Expand Down
2 changes: 1 addition & 1 deletion app/src/features/chats/media/MediaUploadComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const InvisibleButton = styled.div`
`;
interface ChildProps {
file: File | null;
setFile: React.Dispatch<React.SetStateAction<File | null>>;
setFile: (file: File) => void;
setIsFilePreviewOpen: React.Dispatch<React.SetStateAction<boolean>>;
}

Expand Down
Loading