FEAT: Added more info & functionality to UserPage & Added ability to follow streamers on both UserPage and VideoPage;
Added shortcut to toggle chat;
This commit is contained in:
21
frontend/src/hooks/useAuthModal.ts
Normal file
21
frontend/src/hooks/useAuthModal.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
|
||||
export function useAuthModal() {
|
||||
const [showAuthModal, setShowAuthModal] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (showAuthModal) {
|
||||
document.body.style.overflow = "hidden";
|
||||
} else {
|
||||
document.body.style.overflow = "unset";
|
||||
}
|
||||
return () => {
|
||||
document.body.style.overflow = "unset";
|
||||
};
|
||||
}, [showAuthModal]);
|
||||
|
||||
return {
|
||||
showAuthModal,
|
||||
setShowAuthModal,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user