From 693e3a0e6a958d30deb9b464e754373f75704578 Mon Sep 17 00:00:00 2001
From: GabrielCarames <49535753+GabrielCarames@users.noreply.github.com>
Date: Sun, 9 Oct 2022 10:17:33 -0300
Subject: [PATCH] feat: add loader spinner on initial data rendering
---
src/App.tsx | 4 ++-
src/components/Chats/useChats.ts | 10 +++++--
.../LoaderSpinner/LoaderSpinner.tsx | 21 +++++++++++++++
.../LoaderSpinner/_loaderSpinner.scss | 14 ++++++++++
src/scss/index.css | 15 +++++++++++
src/scss/index.css.map | 2 +-
src/scss/index.scss | 1 +
src/sections/ChatIndex/useChatIndex.tsx | 6 +++--
src/slicers/loaderSpinnerSlice.ts | 26 +++++++++++++++++++
src/store/store.ts | 4 ++-
10 files changed, 96 insertions(+), 7 deletions(-)
create mode 100644 src/components/LoaderSpinner/LoaderSpinner.tsx
create mode 100644 src/components/LoaderSpinner/_loaderSpinner.scss
create mode 100644 src/slicers/loaderSpinnerSlice.ts
diff --git a/src/App.tsx b/src/App.tsx
index 3d405fc..2c9a1fc 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -8,16 +8,18 @@ import ChatIndex from "./sections/ChatIndex/ChatIndex"
import NotFound from "./sections/NotFound/NotFound"
import Register from "./sections/Register/Register"
import Login from "./sections/Login/Login"
+import LoaderSpinner from "./components/LoaderSpinner/LoaderSpinner"
function App() {
const alertMessage = useSelector((state: any) => state.alertMessage)
const loader = useSelector((state: any) => state.loader)
-
+ const loaderSpinner = useSelector((state: any) => state.loaderSpinner)
return (
{alertMessage.visible && }
{loader.status && }
+ {loaderSpinner.status && }
diff --git a/src/components/Chats/useChats.ts b/src/components/Chats/useChats.ts
index 58ee631..cbf73f1 100644
--- a/src/components/Chats/useChats.ts
+++ b/src/components/Chats/useChats.ts
@@ -1,14 +1,16 @@
import { useEffect } from "react"
-import { useSelector } from "react-redux"
+import { useDispatch, useSelector } from "react-redux"
import { useFetchingMethod } from "../../apollo/useFetchingMethod"
import { chatsFromLoggedUser } from "../../graphql/queries"
import { setChats } from "../../slicers/chatsSlice"
+import { stopLoaderSpinner } from "../../slicers/loaderSpinnerSlice"
export const useChats = () => {
const loggedUser = useSelector((state: any) => state.loggedUser)
const chats = useSelector((state: any) => state.chats)
+ const dispatch = useDispatch()
- const { lazyQueryMethod: getChats } = useFetchingMethod(chatsFromLoggedUser, setChats)
+ const { lazyQueryMethod: getChats, loading } = useFetchingMethod(chatsFromLoggedUser, setChats)
const defineChatName = (users: any) => {
const chatName = users.find((user: any) => user.id !== loggedUser.id && user).username
@@ -22,5 +24,9 @@ export const useChats = () => {
})
}, [loggedUser.id])
+ useEffect(() => {
+ !loading && chats && dispatch(stopLoaderSpinner())
+ }, [loading])
+
return { chats, defineChatName }
}
diff --git a/src/components/LoaderSpinner/LoaderSpinner.tsx b/src/components/LoaderSpinner/LoaderSpinner.tsx
new file mode 100644
index 0000000..71a04e1
--- /dev/null
+++ b/src/components/LoaderSpinner/LoaderSpinner.tsx
@@ -0,0 +1,21 @@
+import { Oval } from "react-loader-spinner"
+
+export default function LoaderSpinner() {
+ return (
+
+
+
Cargando Parches Chat...
+
+ )
+}
diff --git a/src/components/LoaderSpinner/_loaderSpinner.scss b/src/components/LoaderSpinner/_loaderSpinner.scss
new file mode 100644
index 0000000..ba6f194
--- /dev/null
+++ b/src/components/LoaderSpinner/_loaderSpinner.scss
@@ -0,0 +1,14 @@
+.loader-spinner {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ gap: 10px;
+ align-items: center;
+ width: 100%;
+ height: 100vh;
+ background-color: black;
+ position: absolute;
+ z-index: 100;
+ color: white;
+ font-size: 20px;
+}
diff --git a/src/scss/index.css b/src/scss/index.css
index 3a919e7..3aa91d2 100644
--- a/src/scss/index.css
+++ b/src/scss/index.css
@@ -1079,4 +1079,19 @@ html body #root .App ul {
.add-friend-section .results .results__item .results__icon {
width: 25px;
height: 25px;
+}
+
+.loader-spinner {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ gap: 10px;
+ align-items: center;
+ width: 100%;
+ height: 100vh;
+ background-color: black;
+ position: absolute;
+ z-index: 100;
+ color: white;
+ font-size: 20px;
}/*# sourceMappingURL=index.css.map */
\ No newline at end of file
diff --git a/src/scss/index.css.map b/src/scss/index.css.map
index 2d979bf..26df85e 100644
--- a/src/scss/index.css.map
+++ b/src/scss/index.css.map
@@ -1 +1 @@
-{"version":3,"sources":["_fonts.scss","index.css","index.scss","../sections/ChatIndex/_chatIndex.scss","../sections/Register/_register.scss","_variables.scss","../sections/NotFound/_notFound.scss","../sections/Login/_login.scss","../sections/Home/_home.scss","../components/ChatPreviewImage/_chatPreviewImage.scss","../components/AccountQuestion/_accountQuestion.scss","../components/FormGroupInput/_formGroupInput.scss","../components/ViewRepository/_viewRepository.scss","../components/ChatInfoHeader/_chatInfoHeader.scss","../components/AlertMessage/_alertMessage.scss","../components/EmojisPicker/_emojisPicker.scss","../components/ChatInput/_chatInput.scss","../components/Messages/_messages.scss","../components/Message/_message.scss","../components/Chats/Chat/_chat.scss","../components/Groups/_groups.scss","../components/Button/_button.scss","../components/GoHome/_goHome.scss","../components/Loader/_loader.scss","../components/Chats/_chats.scss","../components/Group/_group.scss","../components/Chat/_chat.scss","../components/Form/_form.scss","../components/LoggedUserArea/_loggedUserArea.scss","../components/UserQuickOptions/_userQuickOptions.scss","../components/AddFriend/_addFriend.scss"],"names":[],"mappings":"AAEA;EACE,oBAHW;EAIX,4DAAA;EACA,gBAAA;EACA,kBAAA;ACDF;ADIA;EACE,oBAVW;EAWX,kEAAA;EACA,gBAAA;EACA,kBAAA;ACFF;ADKA;EACE,oBAjBW;EAkBX,6DAAA;EACA,gBAAA;EACA,kBAAA;ACHF;ADMA;EACE,oBAxBW;EAyBX,+DAAA;EACA,gBAAA;ACJF;ADMA;EACE,oBA7BW;EA8BX,8DAAA;EACA,gBAAA;ACJF;ADMA;EACE,oBAlCW;EAmCX,4DAAA;EACA,gBAAA;ACJF;AC7BA;EACE,sBAAA;EACA,aAAA;AD+BF;AC9BE;;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BAAA;A7Bu8BJ;A6Bt8BI;EACE,gBAAA;A7Bw8BN;A6Bt8BI;EACE,WAAA;EACA,YAAA;EACA,YAAA;EACA,6BAAA;EACA,eAAA;A7Bw8BN;A6Bv8BM;EACE,WAAA;EACA,YAAA;A7By8BR;A6Br8BE;EACE,WAAA;EACA,YAAA;EACA,mBAAA;EACA,YAAA;EACA,yBAAA;EACA,cAAA;EACA,uBAAA;EACA,sBAAA;A7Bu8BJ;A6Bt8BI;EACE,0BAAA;A7Bw8BN;A6Br8BE;EACE,WAAA;EACA,iBAAA;EACA,aAAA;EACA,uBAAA;EACA,mBAAA;A7Bu8BJ;A6Br8BE;EACE,aAAA;EACA,sBAAA;EACA,QAAA;EACA,2BAAA;A7Bu8BJ;A6Bt8BI;EACE,aAAA;EACA,mBAAA;EACA,8BAAA;EACA,eAAA;A7Bw8BN;A6Bv8BM;EACE,yBzBvDc;AJggCtB;A6Bx8BQ;EACE,yBAAA;A7B08BV;A6Bv8BM;EACE,aAAA;EACA,mBAAA;EACA,SAAA;A7By8BR;A6Bx8BQ;EACE,WAAA;EACA,YAAA;EACA,mBAAA;A7B08BV;A6Bv8BM;EACE,WAAA;EACA,YAAA;A7By8BR","file":"index.css"}
\ No newline at end of file
+{"version":3,"sources":["_fonts.scss","index.css","index.scss","../sections/ChatIndex/_chatIndex.scss","../sections/Register/_register.scss","_variables.scss","../sections/NotFound/_notFound.scss","../sections/Login/_login.scss","../sections/Home/_home.scss","../components/ChatPreviewImage/_chatPreviewImage.scss","../components/AccountQuestion/_accountQuestion.scss","../components/FormGroupInput/_formGroupInput.scss","../components/ViewRepository/_viewRepository.scss","../components/ChatInfoHeader/_chatInfoHeader.scss","../components/AlertMessage/_alertMessage.scss","../components/EmojisPicker/_emojisPicker.scss","../components/ChatInput/_chatInput.scss","../components/Messages/_messages.scss","../components/Message/_message.scss","../components/Chats/Chat/_chat.scss","../components/Groups/_groups.scss","../components/Button/_button.scss","../components/GoHome/_goHome.scss","../components/Loader/_loader.scss","../components/Chats/_chats.scss","../components/Group/_group.scss","../components/Chat/_chat.scss","../components/Form/_form.scss","../components/LoggedUserArea/_loggedUserArea.scss","../components/UserQuickOptions/_userQuickOptions.scss","../components/AddFriend/_addFriend.scss","../components/LoaderSpinner/_loaderSpinner.scss"],"names":[],"mappings":"AAEA;EACE,oBAHW;EAIX,4DAAA;EACA,gBAAA;EACA,kBAAA;ACDF;ADIA;EACE,oBAVW;EAWX,kEAAA;EACA,gBAAA;EACA,kBAAA;ACFF;ADKA;EACE,oBAjBW;EAkBX,6DAAA;EACA,gBAAA;EACA,kBAAA;ACHF;ADMA;EACE,oBAxBW;EAyBX,+DAAA;EACA,gBAAA;ACJF;ADMA;EACE,oBA7BW;EA8BX,8DAAA;EACA,gBAAA;ACJF;ADMA;EACE,oBAlCW;EAmCX,4DAAA;EACA,gBAAA;ACJF;AC7BA;EACE,sBAAA;EACA,aAAA;AD+BF;AC9BE;;;EAGE,mBAAA;ADgCJ;AC9BE;EACE,SAAA;EACA,kBAAA;EACA,aAAA;EACA,WAAA;EACA,oBFhBS;EEiBT,gBAAA;EACA,eAAA;EACA,kBAAA;ADgCJ;AC/BI;EACE,YAAA;ADiCN;AChCM;EACE,kBAAA;ADkCR;ACjCQ;;EAEE,gBAAA;EACA,UAAA;EACA,SAAA;ADmCV;;AE/DA;EACE,aAAA;EACA,WAAA;EACA,aAAA;EACA,kBAAA;EACA,kBAAA;AFkEF;AEjEE;EACE,aAAA;EACA,sBAAA;EACA,WAAA;EACA,eAAA;EACA,YAAA;EACA,kBAAA;AFmEJ;;AE/DA;EAEI;IACE,gBAAA;EFiEJ;AACF;AGrFA;EACE,aAAA;EACA,sBAAA;EACA,uBAAA;EACA,mBAAA;EACA,sBAAA;EACA,aAAA;EACA,WAAA;EACA,aAAA;EACA,yBCTa;AJgGf;AGtFE;EACE,aAAA;EACA,sBAAA;EACA,mBAAA;EACA,SAAA;EACA,cCJS;EDKT,WAAA;EACA,gBAAA;EACA,2BAAA;EAAA,w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8BQ;EACE,WAAA;EACA,YAAA;EACA,mBAAA;A7B08BV;A6Bv8BM;EACE,WAAA;EACA,YAAA;A7By8BR;;A8BrhCA;EACE,aAAA;EACA,sBAAA;EACA,uBAAA;EACA,SAAA;EACA,mBAAA;EACA,WAAA;EACA,aAAA;EACA,uBAAA;EACA,kBAAA;EACA,YAAA;EACA,YAAA;EACA,eAAA;A9BwhCF","file":"index.css"}
\ No newline at end of file
diff --git a/src/scss/index.scss b/src/scss/index.scss
index 306bddc..027d445 100644
--- a/src/scss/index.scss
+++ b/src/scss/index.scss
@@ -63,3 +63,4 @@ html {
@import "../components/LoggedUserArea/loggedUserArea";
@import "../components/UserQuickOptions/userQuickOptions";
@import "../components/AddFriend/addFriend";
+@import "../components/LoaderSpinner/loaderSpinner";
diff --git a/src/sections/ChatIndex/useChatIndex.tsx b/src/sections/ChatIndex/useChatIndex.tsx
index 73dd078..7c9fc86 100644
--- a/src/sections/ChatIndex/useChatIndex.tsx
+++ b/src/sections/ChatIndex/useChatIndex.tsx
@@ -1,5 +1,5 @@
import { useEffect, useState } from "react"
-import { useSelector } from "react-redux"
+import { useDispatch, useSelector } from "react-redux"
import { setLoggedUserField } from "../../slicers/loggedUserSlice"
import { LOGGED_USER_MESSAGE_NOTIFICATION_SUSCRIPTION } from "../../graphql/subscriptions"
import { LoggedUserId, chatById } from "../../graphql/queries"
@@ -9,6 +9,7 @@ import Chat from "../../components/Chat/Chat"
import Home from "../Home/Home"
import { useNotifications } from "../../hooks/useNotifications"
import { useSubscription } from "@apollo/client"
+import { startLoaderSpinner } from "../../slicers/loaderSpinnerSlice"
const maxMobileDeviceWidth = 480
const notMobile = window.screen.width >= maxMobileDeviceWidth
@@ -19,7 +20,7 @@ export const useChatIndex = (chatContainer: React.MutableRefObject) =
const [firstAccess, setFirstAccess] = useState(!notMobile)
const { showChat } = useShowChat()
const { data } = useSubscription(LOGGED_USER_MESSAGE_NOTIFICATION_SUSCRIPTION, { variables: { userId: loggedUser.id } })
-
+ const dispatch = useDispatch()
const { emitSoundOnNewMessage, showNewNotificationOnBrowserTab, showCurrentNotificationsOnBrowserTab } = useNotifications()
const desktopBehaviour = () => (showChat ? : )
@@ -39,6 +40,7 @@ export const useChatIndex = (chatContainer: React.MutableRefObject) =
useEffect(() => {
showCurrentNotificationsOnBrowserTab()
+ dispatch(startLoaderSpinner())
}, [])
return { firstAccess, setFirstAccess, mobileBehaviour, desktopBehaviour, notMobile }
diff --git a/src/slicers/loaderSpinnerSlice.ts b/src/slicers/loaderSpinnerSlice.ts
new file mode 100644
index 0000000..08235ed
--- /dev/null
+++ b/src/slicers/loaderSpinnerSlice.ts
@@ -0,0 +1,26 @@
+import { createSlice } from "@reduxjs/toolkit"
+
+interface loader {
+ status: boolean
+}
+
+const initialState: loader = {
+ status: false
+}
+
+export const loaderSpinnerSlice = createSlice({
+ name: "loader",
+ initialState,
+ reducers: {
+ startLoaderSpinner: state => {
+ state.status = true
+ },
+ stopLoaderSpinner: state => {
+ state.status = false
+ }
+ }
+})
+
+export const { startLoaderSpinner, stopLoaderSpinner } = loaderSpinnerSlice.actions
+
+export default loaderSpinnerSlice.reducer
diff --git a/src/store/store.ts b/src/store/store.ts
index b23c7a4..5a196e0 100644
--- a/src/store/store.ts
+++ b/src/store/store.ts
@@ -1,4 +1,5 @@
import { configureStore } from "@reduxjs/toolkit"
+import loaderSpinnerReducer from "../slicers/loaderSpinnerSlice"
import alertMessageReducer from "../slicers/alertMessageSlice"
import loggedUserReducer from "../slicers/loggedUserSlice"
import messsagesReducer from "../slicers/messagesSlice"
@@ -15,6 +16,7 @@ export const store = configureStore({
groups: gropsReducer,
chats: chatsReducer,
chat: chatReducer,
- messages: messsagesReducer
+ messages: messsagesReducer,
+ loaderSpinner: loaderSpinnerReducer
}
})