Skip to content

Commit 41bfea4

Browse files
laoder updated and config file is fixed
1 parent a386660 commit 41bfea4

File tree

5 files changed

+44
-16
lines changed

5 files changed

+44
-16
lines changed

src/Components/ChatContainer/ChatContainer.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
VoiceCallButton,
1414
VideoCallButton,
1515
ConversationHeader,
16-
Loader,
1716
TypingIndicator,
1817
} from "@chatscope/chat-ui-kit-react";
1918
import {
@@ -44,6 +43,7 @@ import { IoSettingsOutline } from "react-icons/io5";
4443
import { MdOutlineDeleteSweep } from "react-icons/md";
4544
import FloatBtnComp from "../FloatButton/FloatBtn";
4645
import "@chatscope/chat-ui-kit-styles/dist/default/styles.min.css";
46+
import LoaderComp from "../Loader/Loader";
4747

4848
function UserChat() {
4949
const [messageInputValue, setMessageInputValue] = useState("");
@@ -304,8 +304,8 @@ function UserChat() {
304304
// Showing loader
305305
if (loading) {
306306
return (
307-
<div className="flex justify-center items-center h-screen">
308-
<Loader />
307+
<div className="loader-container">
308+
<LoaderComp />
309309
</div>
310310
);
311311
}

src/Components/Loader/Loader.jsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const LoaderComp = () => {
2+
3+
return <div className="loader"></div>;
4+
};
5+
6+
export default LoaderComp;

src/Routes/Router.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import UserSignupPage from "../Pages/SignupLogin/SignupLogin";
33
import ChatPage from "../Pages/Chat/Chat";
44
import { useEffect, useState } from "react";
55
import { onAuthStateChanged, auth } from "../config/firebase.config";
6-
import { Loader } from "@chatscope/chat-ui-kit-react";
6+
import LoaderComp from "../Components/Loader/Loader";
77

88
function RouterComp() {
99
const [isUser, setIsUser] = useState(false);
@@ -23,8 +23,8 @@ function RouterComp() {
2323

2424
if (loading) {
2525
return (
26-
<div className="flex justify-center items-center h-screen">
27-
<Loader />
26+
<div className="loader-container">
27+
<LoaderComp />
2828
</div>
2929
);
3030
}

src/config/conf.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const firebaseKeys = {
44
authDomain: String(import.meta.env.VITE_AUTH_DOMAIN),
55
projectId: String(import.meta.env.VITE_PROJECT_ID),
66
storageBucket: String(import.meta.env.VITE_STORAGE_BUCKET),
7-
VITE_MESSANGING_SENDER_ID: String(import.meta.env.VITE_MESSANGING_SENDER_ID),
8-
VITE_APP_ID: String(import.meta.env.VITE_APP_ID),
7+
messagingSenderId: String(import.meta.env.VITE_MESSANGING_SENDER_ID),
8+
appId: String(import.meta.env.VITE_APP_ID),
99
};
1010
export default firebaseKeys;

src/index.scss

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,36 @@ body {
8484
}
8585

8686
//Loader Css
87-
.cs-loader {
88-
font-size: 50px !important;
89-
}
90-
.cs-loader::before {
91-
border-color: #9ab3e3 !important;
92-
}
93-
.cs-loader::after {
94-
border-color: #4a79ca transparent transparent !important;
87+
.loader-container {
88+
display: flex;
89+
justify-content: center;
90+
align-items: center;
91+
height: 100vh;
92+
}
93+
94+
.loader {
95+
width: 120px;
96+
height: 22px;
97+
border-radius: 20px;
98+
color: #123d82;
99+
border: 2px solid;
100+
position: relative;
101+
}
102+
103+
.loader::before {
104+
content: "";
105+
position: absolute;
106+
margin: 2px;
107+
inset: 0 100% 0 0;
108+
border-radius: inherit;
109+
background: currentColor;
110+
animation: l6 2s infinite;
111+
}
112+
113+
@keyframes l6 {
114+
100% {
115+
inset: 0;
116+
}
95117
}
96118

97119
//Media Queries

0 commit comments

Comments
 (0)