simple jwt token validation from frontend
This commit is contained in:
@@ -4,7 +4,7 @@ import './dashboard.css';
|
||||
import { MenuDock } from '@/components/ui/shadcn-io/menu-dock';
|
||||
import { Home, Settings, Bell } from 'lucide-react';
|
||||
import { Avatar, AvatarImage, AvatarFallback } from '@/components/ui/avatar';
|
||||
|
||||
import { jwtexp } from '@/lib/utils';
|
||||
const menuItems = [
|
||||
{ label: 'home', icon: Home, onClick: () => console.log('Home clicked') },
|
||||
{ label: 'notify', icon: Bell, onClick: () => console.log('Notifications clicked') },
|
||||
@@ -21,7 +21,9 @@ export default function Dashboard() {
|
||||
{ title: "title16", due_date: "2025-10-15", priority: "medium", id: 6, status: "completed" },
|
||||
{ title: "super late title", due_date: "2025-10-15", priority: "low", id: 2, status: "open" }
|
||||
];
|
||||
|
||||
const token = localStorage.getItem('access_token');
|
||||
const tokenExp = jwtexp(token);
|
||||
console.log(tokenExp);
|
||||
// Get current date and week
|
||||
const today = new Date();
|
||||
const currentDay = today.getDay();
|
||||
|
||||
Reference in New Issue
Block a user