Skip to content

Commit

Permalink
🐛 fix top-up link is null
Browse files Browse the repository at this point in the history
  • Loading branch information
MartialBE committed Dec 26, 2023
1 parent fb24d02 commit 002dba5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web/src/hooks/useAuth.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { isAdmin } from 'utils/common';
import { useNavigate } from 'react-router-dom';
const navigate = useNavigate();

const useAuth = () => {
const userIsAdmin = isAdmin();
const navigate = useNavigate();

if (!userIsAdmin) {
navigate('/panel/404');
Expand Down
2 changes: 1 addition & 1 deletion web/src/views/Topup/component/TopupCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const TopupCard = () => {
};

useEffect(() => {
let status = localStorage.getItem('status');
let status = localStorage.getItem('siteInfo');
if (status) {
status = JSON.parse(status);
if (status.top_up_link) {
Expand Down

0 comments on commit 002dba5

Please sign in to comment.