adjusting dims for info box
This commit is contained in:
1 parent
ccca0edb65
commit
12d086a5c0
6 files changed
+81
-68
No files matched your search
@@ -4,6 +4,7 @@ import { useState, useEffect } from "react";
|
||||
interface Size {
|
||||
width: number;
|
||||
height: number;
|
||||
ratioWbh: number;
|
||||
}
|
||||
|
||||
// Hook
|
||||
@@ -13,6 +14,7 @@ export default function useWindowSize(): Size {
|
||||
const [windowSize, setWindowSize] = useState<Size>({
|
||||
width: window.innerWidth,
|
||||
height: window.innerHeight,
|
||||
ratioWbh: window.innerWidth / window.innerHeight,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
@@ -22,6 +24,7 @@ export default function useWindowSize(): Size {
|
||||
setWindowSize({
|
||||
width: window.innerWidth,
|
||||
height: window.innerHeight,
|
||||
ratioWbh: window.innerWidth / window.innerHeight,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user