purityselect/resources/js/router/utils.js
2024-10-25 01:05:27 +05:00

8 lines
339 B
JavaScript

/**
* Return if user is logged in
* This is completely up to you and how you want to store the token in your frontend application
* e.g. If you are using cookies to store the application please update this function
*/
export const isUserLoggedIn = () =>
!!(localStorage.getItem("userData") && localStorage.getItem("accessToken"));