From f99e74760448728fbd4b1792d7f683ced66bd5f7 Mon Sep 17 00:00:00 2001 From: Tima Date: Mon, 19 Feb 2018 11:18:17 -0800 Subject: [PATCH] used isMobile and showChapters to calculate padding --- pages/public/read-chapter.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pages/public/read-chapter.js b/pages/public/read-chapter.js index 9db26e66..0486d2f5 100644 --- a/pages/public/read-chapter.js +++ b/pages/public/read-chapter.js @@ -176,9 +176,16 @@ class ReadChapter extends React.Component { showChapters, } = this.state; + let padding = '20px 20%'; + if (!isMobile && showChapters) { + padding = '20px 10%'; + } else if (isMobile) { + padding = '0px 10px'; + } + return (
{ this.mainContent = c; }}