Relative Content

Tag Archive for javascripthtmlreactjs

scroll to the top of the page in react/js

I have a page diveded in 3 components 1)sidebar 2)content wrapper which containts the 1)LoggedIn div and 2)main content after the submition of the form a modal is shown and after that i want the main content to scroll up in the original position (like refreshing the page)

shadcn card – semantic HTML

when using card.tsx from shadcn I see that’s a div styled with tailwind (the card itself). Should I change it to section instead of div for semantic HTML? should I change also the footer (adding footer for example), header (adding header tag) for semantic HTML ?

How to run vanilla HTML and Vanilla Javascript in React?

I have the task to “copy+paste” a page that used to be run in vanilla html and javascript into this React Application… I want to avoid refactoring as much as possible because this singular html and the vanilla.js that comes with it are really specific and big and it works with another .php file but that doesn’t come into account (for now?)

Base64 image in new tab wont render unless refreshed

I’m trying to render an image from my API to a new tab. I do this by getting the image in Base64 encoding, then using the “data:image/…” method. When I press a link to any image a blank window opens. But once I reload the tab the image renders properly. I want the image to load as soon as I open the new tab.

“The buffer passed to decodeAudioData contains an unknown content type.” Error React

Started working on a project last night, woke up to work on it today, and I’m randomly getting the error: “The buffer passed to decodeAudioData contains an unknown content type.”. Nothing has changed since I last worked on this. I didn’t even commit. No, nothing has changed to the audio files. I have exported them multiple times, in Audacity, FL, and used both .wav and .mp3. Same error. Seems to be completly random.