frankcollins3 / fill_container

codecamp team project updated with new icon screen menu + puppeteer icon search, GraphQL, redux, relational psql !mongo, and accuweatherAPI
1 stars 0 forks source link

responsive CSS not working since width is set in react logic based on percentage [5:20pm] #254

Open frankcollins3 opened 1 year ago

frankcollins3 commented 1 year ago

attempting to do: set width based on pixels

error: those buttons that also act as a bar graph for remaining water intake have weight dynamically set by percentage Screen Shot 2023-06-30 at 4 59 42 PM

👎 @media only screen (600px) { } ... media queries aren't working seemingly because width is set in logic.

proposed approach: find a way to get width from window.location and perform width setting expressions with limiters that lowered width setting

frankcollins3 commented 1 year ago

part of this approach already included: changing div to Container in the hope that bootstrap asserted the needed width-responsive UI adjustment to fit cont

<Container id="Reminder-Cont">

  • frankcollins3 commented 1 year ago
    ERROR in src/components/elements/Reminder/Reminder.tsx:33:26
    TS2339: Property 'width' does not exist on type 'Window & typeof globalThis'.
        31 |       console.log('window.location')
        32 |       console.log(window.location)
      > 33 |       console.log(window.width().toFixed())
           |                          ^^^^^
        34 |       if (REMINDER_CLICK_COUNT === HYDRO_SCHEDULE.length) {
        35 |         if (!updateFunc) {      
        36 |           (async() => {          

    [5:33pm]

    frankcollins3 commented 1 year ago

    👎 console.log($(window).width().toFixed()) [5:33pm]