]> cat aescling's git repositories - mastodon.git/commitdiff
Fix PropTypes warning in OnboardingModal (#2191)
authorYamagishi Kazutoshi <ykzts@desire.sh>
Thu, 20 Apr 2017 11:22:54 +0000 (20:22 +0900)
committerEugen <eugen@zeonfederated.com>
Thu, 20 Apr 2017 11:22:54 +0000 (13:22 +0200)
app/assets/javascripts/components/features/ui/components/onboarding_modal.jsx

index 8d5132ea251f98b2c92c9b4750cf83eb79ecb3af..e5c395119f65cf579bdf96270d4990afa7b2af57 100644 (file)
@@ -43,6 +43,7 @@ const PageTwo = () => (
         text='Awoo! #introductions'
         suggestions={Immutable.List()}
         mentionedDomains={[]}
+        spoiler={false}
         onChange={() => {}}
         onSubmit={() => {}}
         onPaste={() => {}}
@@ -213,7 +214,7 @@ const OnboardingModal = React.createClass({
     }
 
     const styles = pages.map((page, i) => ({
-      key: i,
+      key: `page-${i}`,
       style: { opacity: spring(i === currentIndex ? 1 : 0) }
     }));
 
@@ -223,7 +224,7 @@ const OnboardingModal = React.createClass({
           {interpolatedStyles =>
             <div className='onboarding-modal__pager'>
               {pages.map((page, i) =>
-                <div key={i} style={{ opacity: interpolatedStyles[i].style.opacity, pointerEvents: i === currentIndex ? 'auto' : 'none' }}>{page}</div>
+                <div key={`page-${i}`} style={{ opacity: interpolatedStyles[i].style.opacity, pointerEvents: i === currentIndex ? 'auto' : 'none' }}>{page}</div>
               )}
             </div>
           }