Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Amit Patel
@AmitP88
the code I used is from the example code in the docs (will modify later)
Liang-Shih Lin
@ll931217
@AbrisM Use animation and opacity
Chi
@chiyc
@AmitP88 Do you possibly still need slick-carousel css and fonts?
Amit Patel
@AmitP88
@chiyc I do, but I was hoping I can save that for later. For now I'm more focused on just getting my components (and content) to render properly in the right places
Chi
@chiyc
@AmitP88 It's possible that you need them for it to display properly. You can either @import the packages you need or add the CDN link to your HTML, which would be a quick change
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.min.css" />
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick-theme.min.css" />
Amit Patel
@AmitP88
@chiyc hmm, I'll give it a shot real quick using the CDN. if it works, I'll import the packages
@chiyc it sorta worked, except now my previous button disappeared lol. I'll see if I can figure that part out though
slideshow-adjusted.png
Chi
@chiyc
Hahah, did you get both CDN links in there?
Amit Patel
@AmitP88
yeah lol
hmmm, my close button won't work either when I click it
Chi
@chiyc
Interesting. Also, are you using React DevTools to help debug your app?
Amit Patel
@AmitP88
yeah, I'm using that too, but no errors showed up on that either
reactdevtools.png
Chi
@chiyc
Even if there are no actual errors, it can help you locate where the different components of your app are
Your <Slider /> component should have a nested <InnerSlider /> component and a div with your <PrevArrow /> and <NextArrow /> inside that div
Amit Patel
@AmitP88
slideshow-adjusted.png
Chi
@chiyc
Exactly, and when you hover over the different lines of React code, it highlights the corresponding element on the page
Amit Patel
@AmitP88
yeah, the <InnerSlider> is in there. I don't know why the modal close button isn't working though. I'm not sure if I should move it to the slideshow component, since the slideshow is nested within it
logically the modal component funcationality and slideshow funcationality should be separate right?
Chi
@chiyc
I don't know if you've changed the Modal code from earlier, but you had set isOpen={true}, meaning it will never close
Amit Patel
@AmitP88
oh yeah, I changed it from before
modal(new).png
Chi
@chiyc
And yeah, your carousel shouldn't be interfering with the modal functionality
Amit Patel
@AmitP88
omg
I did inspect elements and my dots are overlayed on the close button lol
XP
Chi
@chiyc
Ohhh, hahahah. They're blocking your click?
Amit Patel
@AmitP88
overlay.png
from the looks of it yeah
Chi
@chiyc
By the way, there's this awesome Chrome extension called Pesticide that's really good at showing you the actual boxes of elements on your page. It helped me track down a bug where I couldn't get onHover to work correctly once
Amit Patel
@AmitP88
ah ok, I'll check it out right now :)
wow, that is super helpful
@chiyc thanks bro :) looks like I'll have to create a stylesheet and adjust the margin for the close button, but at least it wasn't an error with my components, which I was worried about
Chi
@chiyc
Sure thing! :smile:
Amit Patel
@AmitP88
damn, it won't let me give you cookies lol
@chiyc thank you :)
CamperBot
@camperbot
amitp88 sends brownie points to @chiyc :sparkles: :thumbsup: :sparkles:
:cookie: 343 | @chiyc |http://www.freecodecamp.org/chiyc
Amit Patel
@AmitP88
there we go lol
Chi
@chiyc
Hahah, thanks! :yum:
Amit Patel
@AmitP88
lol np X)
Pendramon
@Pendramon
Why doesn't this work? document.getElementById("result").innerText = Number(itemAmount * itemCost) - Number(discountAmount / 100); returns to me NaN all values are correct and are numbers for sure. I am trying to calculate price after sale percentage;
Chi
@chiyc
@Pendramon Do you have the rest of the code?
Pendramon
@Pendramon
Everything else is correct i am 100% sure 1 sec i'll get it for you
Pendramon
@Pendramon
@chiyc nvm i got it. Had it as itemAmount = document.getElementById("itemInput").value; and so on... just changed it to document.getElementById("itemInput") and did (itemAmount.value itemCost.value) - ((itemAmount.value itemCost.value) - discountAmount / 100)
@chiyc Thanks for responding tho really appreciate it
CamperBot
@camperbot
pendramon sends brownie points to @chiyc :sparkles: :thumbsup: :sparkles:
:cookie: 344 | @chiyc |http://www.freecodecamp.org/chiyc
Chi
@chiyc
Oh, cool. You’re welcome! It’s awesome you figured it out!