parent
3072e42b0a
commit
44ce3a3c98
17 changed files with 13 additions and 64 deletions
@ -1,8 +0,0 @@ |
||||
export const TOKEN_COOKIE_NAME = '__roadmapsh_jt__'; |
||||
|
||||
export const INTERNAL_PATHS = [ |
||||
'/login', |
||||
'/signup', |
||||
'/settings/profile', |
||||
'/settings/change-password', |
||||
]; |
@ -1,19 +0,0 @@ |
||||
--- |
||||
import ProfileDetails from '../../components/Profile/profile-details'; |
||||
import BaseLayout from '../../layouts/BaseLayout.astro'; |
||||
--- |
||||
|
||||
<BaseLayout title='Profile'> |
||||
<div class='container'> |
||||
<ProfileDetails client:idle /> |
||||
</div> |
||||
</BaseLayout> |
||||
|
||||
<script> |
||||
import Cookies from 'js-cookie'; |
||||
import { TOKEN_COOKIE_NAME } from '../../lib/constants'; |
||||
const token = Cookies.get(TOKEN_COOKIE_NAME); |
||||
if (!token) { |
||||
window.location.href = '/'; |
||||
} |
||||
</script> |
Loading…
Reference in new issue