├── .gitignore ├── README.md ├── index.html ├── package-lock.json ├── package.json ├── postcss.config.js ├── public ├── default-avatar.png ├── error.svg ├── facebook.svg ├── google.svg ├── icon.svg ├── illustration.svg ├── reactions-icon │ ├── angry.svg │ ├── care.svg │ ├── haha.svg │ ├── like.svg │ ├── love.svg │ ├── sad.svg │ └── wow.svg └── reactions │ ├── angry.gif │ ├── care.gif │ ├── haha.gif │ ├── like.gif │ ├── love.gif │ ├── sad.gif │ └── wow.gif ├── src ├── App.tsx ├── components │ ├── Alert.tsx │ ├── Chat │ │ ├── AvatarFromId.tsx │ │ ├── ChatHeader.tsx │ │ ├── ChatView.tsx │ │ ├── ConversationSettings.tsx │ │ ├── ReactionPopup.tsx │ │ ├── ReactionStatus.tsx │ │ └── ReplyBadge.tsx │ ├── ClickAwayListener.tsx │ ├── FileIcon.tsx │ ├── Group │ │ ├── AddMembers.tsx │ │ ├── Admin.tsx │ │ ├── Members.tsx │ │ └── ViewGroup.tsx │ ├── Home │ │ ├── CreateConversation.tsx │ │ ├── SelectConversation.tsx │ │ ├── SideBar.tsx │ │ └── UserInfo.tsx │ ├── Icon │ │ ├── GifIcon.tsx │ │ ├── ReplyIcon.tsx │ │ └── StickerIcon.tsx │ ├── ImageView.tsx │ ├── Input │ │ ├── EmojiPicker.tsx │ │ ├── GifPicker.tsx │ │ ├── InputSection.tsx │ │ └── StickerPicker.tsx │ ├── Media │ │ ├── Files.tsx │ │ ├── Image.tsx │ │ └── ViewMedia.tsx │ ├── Message │ │ ├── LeftMessage.tsx │ │ └── RightMessage.tsx │ ├── PrivateRoute.tsx │ ├── Skeleton.tsx │ └── SpriteRenderer.tsx ├── hooks │ ├── useCollectionQuery.ts │ ├── useDocumentQuery.ts │ ├── useFetch.tsx │ ├── useLastMessage.ts │ ├── useQueryParams.ts │ └── useUsersInfo.ts ├── main.tsx ├── pages │ ├── Chat.tsx │ ├── Home.tsx │ └── SignIn.tsx ├── shared │ ├── configs.ts │ ├── constants.ts │ ├── firebase.ts │ ├── types.ts │ └── utils.ts ├── store │ └── index.ts ├── styles │ └── index.css └── vite-env.d.ts ├── tailwind.config.js ├── tsconfig.json └── vite.config.ts /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | dist 4 | dist-ssr 5 | *.local 6 | .env -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | "# chat-vite-firebase-react-typescript" 2 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |81 | { 82 | conversation.users.length > 2 && conversation?.group?.groupName 83 | ? conversation.group.groupName 84 | : filtered 85 | ?.map((user) => user.data()?.displayName) 86 | .slice(0, 3) 87 | .join(", ") 88 | } 89 |
90 | )} 91 |Something went wrong
112 |119 | No message recently. Start chatting now. 120 |
121 |108 | { 109 | usersInfo?.find((user) => user.id === key)?.data() 110 | ?.displayName 111 | } 112 |
113 |{data?.data()?.content}
) : data?.data()?.type === "image" 38 | ? ("An image") : data?.data()?.type === "file" 39 | ? ("A file") : data?.data()?.type === "sticker" 40 | ? ("A sticker") : ("Message has been removed") 41 | } 42 |No more user to add
} 65 |Something went wrong
106 |{doc.data().displayName}
135 |56 | {filtered?.[0].data()?.displayName} 57 |
58 | {lastMessageLoading ? ( 59 |62 | {lastMessage?.message} 63 |
64 | )} 65 |110 | {conversation?.group?.groupName || filtered?.map((user) => user.data()?.displayName) 111 | .slice(0, 3) 112 | .join(", ")} 113 |
114 | {lastMessageLoading ? ( 115 |118 | {lastMessage?.message} 119 |
120 | )} 121 |Something went wrong
108 |No conversation found
112 | 118 |ID: {currentUser?.uid}
50 |Email: {currentUser?.email || "None"}
51 |Phone Number: {currentUser?.phoneNumber || "None"}
52 |56 | Change your google / facebook avatar or username to update it here 57 |
58 |55 | Sorry... Giphy has limited the request 56 |
57 |No file found
33 |{formatFileSize(file.data()?.file?.size)}
47 |No image found
53 |146 | {message.file?.name} 147 |
148 | 149 |150 | {formatFileSize(message.file?.size as number)} 151 |
152 |131 | {message.file?.name} 132 |
133 | 134 |135 | {formatFileSize(message.file?.size as number)} 136 |
137 |Conversation does not exists
50 |73 | It's free, fast and secure. We make it easy and fun to stay 74 | close to your favourite people. 75 |
76 | 77 | 85 | 86 | 94 |