Skip to content

Commit 53be3fe

Browse files
adding the loading spinner when refeshing the page
1 parent c51d391 commit 53be3fe

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

client/src/Utils/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const capitalizeTitle = (str) => {
1212
.join(' ');
1313
};
1414

15-
const BASE_URL = "http://127.0.0.1:8000";
15+
const BASE_URL = "http://13.38.84.88:8000";
1616
export default function getProfilePictureUrl(path) {
1717
if (!path) return null;
1818
return `${BASE_URL}/storage/${path}`;

client/src/components/PrivateRoute/index.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import React, { useContext } from "react";
22
import { Navigate } from "react-router-dom";
33
import { AuthContext } from "../Context/AuthorizationContext";
4+
import Loading from "../Loading";
45

56
const PrivateRoute = ({ children }) => {
67
const { user, authLoading } = useContext(AuthContext);
78

8-
if (authLoading) return <div>Loading...</div>;
9+
if (authLoading) return <Loading />;
910

1011
return user ? children : <Navigate to="/login" replace />;
1112
};

0 commit comments

Comments
 (0)