These are chat archives for FreeCodeCamp/HelpFrontEnd

26th
Aug 2018
Conrad Kay
@conradkay
Aug 26 2018 01:22
Would anyone here be interested in styling a pretty big javascript project?
It is completely unstyled currently
Dhaval Vira
@dhavalveera
Aug 26 2018 01:24
text you directly @conradkay
Amit Patel
@AmitP88
Aug 26 2018 01:34
hey guys, I'm trying to use fetch in my react project to obtain some json data and I need a little help. I keep running into this error here:
error.png
when I try to obtain json data from this api:
json.png
the thing is, I'm able to obtain the response and convert that response into a string using .text(). However, I'm not able to use either .json() or JSON.parse() methods to convert either the response itself or the string (stored in text variable) into a JSON object and I have no idea why
I've googled around for solutions to this problem, but any solutions I find seem to not work with my code
Amit Patel
@AmitP88
Aug 26 2018 01:39
Rob
@PGFracing
Aug 26 2018 01:45
http://www.pgfracing.com/store.html how can I get my two bottom rows to float left of the product for sale?
glitz20
@glitz20
Aug 26 2018 02:06
anybody who has worked with rich text editor in react?
Conrad Kay
@conradkay
Aug 26 2018 02:21
@AmitP88 Could it be that there is a traling comma at line 42
Amit Patel
@AmitP88
Aug 26 2018 02:25
@conradkay hmmm, could be. I'll remove all trailing commas and give it a shot. Thanks
Conrad Kay
@conradkay
Aug 26 2018 02:26
@AmitP88 did it work?
Amit Patel
@AmitP88
Aug 26 2018 02:26
@conradkay nah, I still get the same error
Conrad Kay
@conradkay
Aug 26 2018 02:26
hmmm
Conrad Kay
@conradkay
Aug 26 2018 02:28
Here is an async action from my App:
return fetch('https://gist.githubusercontent.com/camperbot/5a022b72e96c4c9585c32bf6a75f62d9/raw/e3c6895ce42069f0ee7e991229064f167fe8ccdc/quotes.json')
        .then(responce => responce.json(), error => console.log('OOPSIE OOPSIE OOPSIE', error)
        )
        .then((json) => dispatch(retrieveQuote(json)))
Amit Patel
@AmitP88
Aug 26 2018 02:29
I even tried changing the end of my url to json and it still didnt work
I've tried my code with different apis and it works fine
  componentDidMount(){
    fetch('https://rawgit.com/AmitP88/a60ab38cb30c150376b548e3e167e2fd/raw/40668c1d7cf6e276ab5c2c0246d81bfab93b2c9d/mockData.json')
    .then(response => {
      let text = response.text();
      return text;

    })
    .then(text => {
      console.log(text);
      console.log(typeof text);
      let converted = JSON.parse(text);
      console.log(converted);
      console.log(typeof converted);      
      return converted;
    });
  }
Conrad Kay
@conradkay
Aug 26 2018 02:33
is the project on github?
Amit Patel
@AmitP88
Aug 26 2018 02:33
nah, I'll make a repo right now
Conrad Kay
@conradkay
Aug 26 2018 02:34
Before that, can you change text to be just json
And have you added this line to your package.json:
"proxy": "http://localhost:3001"
whatever you are using
also restart the serv
server
Amit Patel
@AmitP88
Aug 26 2018 02:36
so you mean, change response.text() to response.json()? I'm using localhost:3000
it's still not working (still getting the same error)
Rob
@PGFracing
Aug 26 2018 02:40
Any idea why not floating left www.pgfracing.con/store.html
For desktop?
Amit Patel
@AmitP88
Aug 26 2018 03:01
@conradkay here's my repo: https://github.com/AmitP88/Server-Loglist
alpox
@alpox
Aug 26 2018 06:57
@AmitP88 what even is the error? Cors?
I mean what does the error say
Vikrant Singh
@VikrantSingh13
Aug 26 2018 09:33
any one know css grid /
?
can you please explain the parameters for -- repeat( [ <positive-integer> | auto-fill | auto-fit ] , <track-list> ) used for grid-template-columns
Fabien SHAN
@X140hu4
Aug 26 2018 09:39
Basically, it is a way to define columns that are similar without having to define them individually.
.container {
  grid-template-columns: repeat(3, 20px [col-start]);
}
instead of
.container {
  grid-template-columns: 20px [col-start] 20px [col-start] 20px [col-start];
}
i want cell 4 to take 3/4 of the remaining space and cell 5 to the rest
is that doable with repeat ?
Niraj Nandish
@Nirajn2311
Aug 26 2018 09:55
@VikrantSingh13 So you want cell 4 to take the last three cells and cell 5 should take the last cell
Fabien SHAN
@X140hu4
Aug 26 2018 09:56
@VikrantSingh13 So cell 1-3 as they are, and from the remaining space cell 4 takes 3/4 and 5 1/4?
Vikrant Singh
@VikrantSingh13
Aug 26 2018 09:56
how do I make that happen ?
Niraj Nandish
@Nirajn2311
Aug 26 2018 09:56
You cant do it with repeat
as there is no pattern to repeat
You will have to do it separately
Vikrant Singh
@VikrantSingh13
Aug 26 2018 09:57
I see @X140hu4 @Nirajn2311 thanks
Fabien SHAN
@X140hu4
Aug 26 2018 09:57
I would use display: flex for that
Vikrant Singh
@VikrantSingh13
Aug 26 2018 09:57
how do I give cookies nowadays ?
thanks @X140hu4 @Nirajn2311
Fabien SHAN
@X140hu4
Aug 26 2018 09:58
I think there isn't any cookie anymore because of some abuse
Niraj Nandish
@Nirajn2311
Aug 26 2018 09:58
Just make grid-column: 13/16 to make cell 4 take the last three cells
Vikrant Singh
@VikrantSingh13
Aug 26 2018 10:12
alright fellers I got it now :D
Donnie
@Donnie-D
Aug 26 2018 10:28
https://s.codepen.io/Donnie-D/debug/xJNYKK/bYMdyeXmRpVr#loseWeight
is it okay? Still a few troubles I am coming across. Need to sort through them one by one :smiley:
Donnie
@Donnie-D
Aug 26 2018 10:36
kinda having a blank moment perhaps. When I resize the window for smaller devices purpose, My content keeps flowing over my header links. scratching head
Niraj Nandish
@Nirajn2311
Aug 26 2018 10:37
Also you go to top button should be lower
Screenshot (16).png
As you can see at the bottom right I can see the button
It should appear only when we scroll down a bit
Donnie
@Donnie-D
Aug 26 2018 10:39
@Nirajn2311 yeah thats how it is on a couple of devices I have checked on. Not sure why it peeks up on yours :confused:
I need to look into it
@Nirajn2311 press ctrl+0 and see if the problem persists please
Donnie
@Donnie-D
Aug 26 2018 10:44
https://codepen.io/Donnie-D/full/xJNYKK/
Its not showing in my browsers like yours. I tell you that frustrates me :laughing:
adding grid-template-areas breaks the css :/
Vikrant Singh
@VikrantSingh13
Aug 26 2018 12:19
nvm fixed it :)
Javier Pons
@JavierPons
Aug 26 2018 12:30
hi there!
anybody can explain how I can . sum or rest same object methods returned value?
_
Rob
@PGFracing
Aug 26 2018 13:07
www.pgfracing.com/store.html (how do I get rid of the white space (Float left doesn’t seem to work) or I am doing something wrong
Niraj Nandish
@Nirajn2311
Aug 26 2018 13:20
Screenshot (17).png
Did you mean the whitespace below the middle column?
Rob
@PGFracing
Aug 26 2018 13:20
just a sec I was trying something different let me upload it again, thank you
okay if refresh trying to get rid of the white space www.pgfracing.com/store.html
THANKS!!!!
Chris Cullen
@123xylem
Aug 26 2018 13:24

```

.main_content{
    position:relative;
        display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 400px;

}

.main_content img{
       position: absolute;
       min-width: 400px;
   left: 50%;    
   z-index:-3;
   transform:translate(-50%);



}

``

How do i get my image to zoom correctly?
It doesnt stay centered on zoom
Rob
@PGFracing
Aug 26 2018 13:26
what’s it look like now?
are you using bootstrap ?
still around @Nirajn2311
Rob
@PGFracing
Aug 26 2018 13:32
Screen Shot 2018-08-26 at 8.32.07 AM.png
How do I get the bottom two columns to float left into that white space?
Rob
@PGFracing
Aug 26 2018 13:48
anyone here?
Chris Cullen
@123xylem
Aug 26 2018 14:35
I have a webpage made that works fine for FF Chrome... when I open in IE it is unrecognisable.. How do i fix this?
Donnie
@Donnie-D
Aug 26 2018 15:36
grrrr still cant get it right. What am I missing or doing wrong? When I resize the browser window for smaller screens, the content is flowing over the body when scrolled down. Why?
https://codepen.io/Donnie-D/full/xJNYKK/
In addition to that other feedbacks are welcome too
I made it!!!1
Rob
@PGFracing
Aug 26 2018 19:24
Congratulations
Get it figured out Donnie?
Niraj Nandish
@Nirajn2311
Aug 26 2018 19:25
Lets hope Tyrion survives S9
and congrats @rubendmatos1985
Rob
@PGFracing
Aug 26 2018 19:26
Niraj did you have any idea how I can fill in the white space
Niraj Nandish
@Nirajn2311
Aug 26 2018 19:27
@PGFracing Nope, i couldn't find a way
But that must be because I just the challenges for RWD and I need to practice
Rob
@PGFracing
Aug 26 2018 19:29
No worries I’m not sure it’s even possible with the way I have it designed
I wonder why your messages aren’t showing in just getting notifications
glitz20
@glitz20
Aug 26 2018 20:48
Anybody who has worked with quill.js for text editor?
How do we display deltas as html in the editor?
_
aenkirch
@aenkirch
Aug 26 2018 22:57
Hi guys, can you help me with this : https://codepen.io/aenkirch/pen/YOPoaw I'm trying to call resolvingCalc() function at the beginning of typingOperator() function to resolve the calc whenever I'm clicking on a new operator on my calculator but it doesn't work !