These are chat archives for FreeCodeCamp/HelpFrontEnd

9th
Oct 2018
glitz20
@glitz20
Oct 09 2018 04:44
anybody familair with css?
Stevegolden12
@Stevegolden12
Oct 09 2018 05:23
+A little Sabin do you have a question?
tightcode
@tightcode
Oct 09 2018 05:59
yeahs bro
Nicolas Ramirez
@kamatheuska
Oct 09 2018 09:28

hey everyone! I am building a simple class, and when trying to access this inside a static method like this:

const { ProductsCollection } = require('../utils/Collection')
let modeledCollection = ProductsCollection.mapToModel(legacy)

I get that this.generateModel is not a function. Here is my class:

class ProductsCollection {
    constructor () {
    generateModel () {
        let model = { name: 'testing' }
        return model
    }

    static mapToModel (legacy) {
        if (!isObject(legacy))
            return legacy

        let current = this.generateModel() // Here!!!
        for (let key in legacy) {
          // some code...
        }
        return current
    }
}

module.exports = { ProductsCollection }

any idea why?

Yashwardhan Pauranik
@yashwp
Oct 09 2018 10:06
Can anyone help me with this issue?
iamkun/dayjs#297
Spyrantis Theodoros
@thodorisanta
Oct 09 2018 11:39
So first time working with @media and when i make my screen smaller than 650px you can see the nav bar on top of my section. i tried adding margins and paddings on the header on the @media, but it didnt actually do anything. How can i fix that?
AJ Brommy
@AJ-Brommy
Oct 09 2018 13:07
send us your code? hard to know what is wrong with out it, it could be something as silly as a bracket in the wrong place, or a missing semi colon.
Supra01
@Supra01
Oct 09 2018 13:17
Hello I hope everyone is doing well. I have a react.js question. I'm making a login component and I was wondering how can I call a function in a child component with another function in the parent component. Sorry I'm not wording this well so I have provided an example below:https://codesandbox.io/s/wkkwo59my5
Nicolas Ramirez
@kamatheuska
Oct 09 2018 13:32
@Supra01 Could you be more specific? which functions?
Supra01
@Supra01
Oct 09 2018 13:36
@kamatheuska lol sorry bout that
@kamatheuska I want to call my prevent() function in my Login component from my LoginPagecomponent's onSubmit function
Nicolas Ramirez
@kamatheuska
Oct 09 2018 18:06
@Supra01 just passes it in a prop that has a function as a value
jusgoose
@gusd773
Oct 09 2018 19:04
does anybody know how keep my footer at the very bottom of my page?
https://s.codepen.io/gusd773/debug/ZqbYyp/PNrvYGgbYjqM
Brad Collins
@BradleyCollins
Oct 09 2018 19:09
try position: absolute ?
jusgoose
@gusd773
Oct 09 2018 19:12
Do I then just mess with the margins & padding? @BradleyCollins
to center it
Brad Collins
@BradleyCollins
Oct 09 2018 19:15
Yea, try using margins rather than padding.
jusgoose
@gusd773
Oct 09 2018 19:43
@BradleyCollins thank you
so since I do not know the guidelines to building resonsive websites I built mine straight from what I know just to make it look the part but I am curious If I could simply alter my current page as is to make it responsive rather than design it with responsive ness in mind
Nicolas Ramirez
@kamatheuska
Oct 09 2018 19:46
@gusd773 it depends on your design
your navbar would need a couple of @media queries here and there
tightcode
@tightcode
Oct 09 2018 19:52
Check out customizr.com for a mobile first responsive boilerplate
Jorge
@flawedLogic506
Oct 09 2018 21:03
hey wazzup guys
tightcode
@tightcode
Oct 09 2018 22:29
sup playa