File tree Expand file tree Collapse file tree 5 files changed +44
-16
lines changed Expand file tree Collapse file tree 5 files changed +44
-16
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ import {
13
13
VoiceCallButton ,
14
14
VideoCallButton ,
15
15
ConversationHeader ,
16
- Loader ,
17
16
TypingIndicator ,
18
17
} from "@chatscope/chat-ui-kit-react" ;
19
18
import {
@@ -44,6 +43,7 @@ import { IoSettingsOutline } from "react-icons/io5";
44
43
import { MdOutlineDeleteSweep } from "react-icons/md" ;
45
44
import FloatBtnComp from "../FloatButton/FloatBtn" ;
46
45
import "@chatscope/chat-ui-kit-styles/dist/default/styles.min.css" ;
46
+ import LoaderComp from "../Loader/Loader" ;
47
47
48
48
function UserChat ( ) {
49
49
const [ messageInputValue , setMessageInputValue ] = useState ( "" ) ;
@@ -304,8 +304,8 @@ function UserChat() {
304
304
// Showing loader
305
305
if ( loading ) {
306
306
return (
307
- < div className = "flex justify-center items-center h-screen " >
308
- < Loader />
307
+ < div className = "loader-container " >
308
+ < LoaderComp />
309
309
</ div >
310
310
) ;
311
311
}
Original file line number Diff line number Diff line change
1
+ const LoaderComp = ( ) => {
2
+
3
+ return < div className = "loader" > </ div > ;
4
+ } ;
5
+
6
+ export default LoaderComp ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import UserSignupPage from "../Pages/SignupLogin/SignupLogin";
3
3
import ChatPage from "../Pages/Chat/Chat" ;
4
4
import { useEffect , useState } from "react" ;
5
5
import { onAuthStateChanged , auth } from "../config/firebase.config" ;
6
- import { Loader } from "@chatscope/chat-ui-kit-react " ;
6
+ import LoaderComp from "../Components/Loader/Loader " ;
7
7
8
8
function RouterComp ( ) {
9
9
const [ isUser , setIsUser ] = useState ( false ) ;
@@ -23,8 +23,8 @@ function RouterComp() {
23
23
24
24
if ( loading ) {
25
25
return (
26
- < div className = "flex justify-center items-center h-screen " >
27
- < Loader />
26
+ < div className = "loader-container " >
27
+ < LoaderComp />
28
28
</ div >
29
29
) ;
30
30
}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ const firebaseKeys = {
4
4
authDomain : String ( import . meta. env . VITE_AUTH_DOMAIN ) ,
5
5
projectId : String ( import . meta. env . VITE_PROJECT_ID ) ,
6
6
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 ) ,
9
9
} ;
10
10
export default firebaseKeys ;
Original file line number Diff line number Diff line change @@ -84,14 +84,36 @@ body {
84
84
}
85
85
86
86
// 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
+ }
95
117
}
96
118
97
119
// Media Queries
You can’t perform that action at this time.
0 commit comments