79309028

Date: 2024-12-26 08:36:19
Score: 0.5
Natty:
Report link

Just to mark this answered,

Instead of using the hook to handle the switching of UI i simply the condition directly inside the page.ts

async function Page() {
  const data = await getSomeData();
  
  const isMobile = customFunctionToPrseUserAgent()
  
  if (isMobile) return <>UI FOR MOBILE</>
  
  return NORMAL UI
}

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Blatzo