79418585

Date: 2025-02-06 16:08:09
Score: 1.5
Natty:
Report link

You guys can use this

export const isServer: boolean = typeof window == "undefined";
 if (!isServer) {
    return JSON.parse(localStorage.getItem("user") || "{}");
  }
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Himanshu Taviyad