Next.js Discord

Discord Forum

Component not visible

Unanswered
Dogue de Bordeaux posted this in #help-forum
Open in Discord
Dogue de BordeauxOP
This does not appear in any file it is called in. Checking with dev tools indicates that the div is there but not visible. It should be a red box.
export default function List() {
  return <div className="w-full h-32 bg-red-500"></div>;
}

13 Replies

Dogue de BordeauxOP
this should also not be an issue with tailwind config
const config: Config = {
  content: ["./src/**/*.{js,ts,jsx,tsx,mdx}"],
...
}
Dogue de BordeauxOP
i am actually hardstuck rn
the height is computing to 0 for some reason
additional context: when imported into the main page (src/app/page.tsx), it works
when imported into src/app/channels/[id]/page.tsx, it does not
it also does not work in src/app/channels/page.tsx
@Dogue de Bordeaux this should also not be an issue with tailwind config js const config: Config = { content: ["./src/**/*.{js,ts,jsx,tsx,mdx}"], ... }
Dogue de BordeauxOP
which makes no sense because all of src/ and its subdirectories is included in my config
Dogue de BordeauxOP
BUT no tailwind is working in the file apparently
because i tried a paragraph with tailwind text color and it didn't change
which is really weird because even when i SPECIFICALLY point it out in my config it doesn't change
"./src/app/channels/[id]/page.tsx"
Dogue de BordeauxOP
BUT when i copypaste code from another file exactly into the target file it works???
i'm completely hardstuck