Skip to content

Commit 4b0c3ed

Browse files
committed
calcWidth fix
1 parent 301cd98 commit 4b0c3ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Cards/CardList.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function calcWidth() {
1010
const middle = 768
1111
const large = 992
1212
const xlarge = 1200
13-
const winWidth = window.innerWidth
13+
const winWidth = document.getElementsByTagName('main')[0].clientWidth || window.innerWidth
1414

1515
if (winWidth >= xlarge) return '25%'
1616
else if (winWidth >= large) return '33.33%'

0 commit comments

Comments
 (0)