chore: get token from google, add the thalos connector and get and persist the thalos token id for future use in other endpoints

This commit is contained in:
Rodolfo Ruiz
2025-08-29 21:14:25 -06:00
parent 339bad77ac
commit 3115d45135
3 changed files with 105 additions and 44 deletions

View File

@@ -1,4 +1,3 @@
// src/components/MenuDrawerPrivate.jsx
import React, { useMemo, useState, useEffect } from 'react';
import {
Drawer, List, ListItemButton, ListItemIcon, ListItemText,
@@ -6,7 +5,6 @@ import {
} from '@mui/material';
import { useTheme } from '@mui/material/styles';
// MUI icons (you can replace with your PNGs later)
import InsightsIcon from '@mui/icons-material/Insights';
import Inventory2Icon from '@mui/icons-material/Inventory2';
import PeopleAltIcon from '@mui/icons-material/PeopleAlt';
@@ -19,7 +17,6 @@ import ExpandMore from '@mui/icons-material/ExpandMore';
const OPEN_WIDTH = 400;
const MINI_WIDTH = 72;
// ---- Hierarchy (from your diagram). Leaves are "CRUD" pages (clickables). ----
const menuData = [
{
title: 'Business Intelligence',
@@ -100,28 +97,24 @@ const menuData = [
];
export default function MenuDrawerPrivate({
open, // optional: for mobile temporary drawer
onClose, // optional: for mobile temporary drawer
onSelect, // (title) => void
onExpandedChange, // (boolean) => void // optional: tell header if expanded/collapsed
open,
onClose,
onSelect,
onExpandedChange,
}) {
const theme = useTheme();
const isMobile = useMediaQuery('(max-width:900px)');
const [collapsed, setCollapsed] = useState(false);
// open states per branch key
const [openMap, setOpenMap] = useState({});
// keep collapsed in sync only if "open" prop provided (mobile)
useEffect(() => {
if (!isMobile) return;
if (typeof open === 'boolean') {
// temporary drawer: collapsed UI is not shown on mobile, treat as expanded
setCollapsed(false);
}
}, [open, isMobile]);
// inform parent of expanded/collapsed (desktop)
useEffect(() => {
onExpandedChange?.(isMobile ? true : !collapsed);
}, [collapsed, isMobile, onExpandedChange]);
@@ -131,7 +124,6 @@ export default function MenuDrawerPrivate({
const toggleCollapse = () => setCollapsed(c => !c);
const handleToggleNode = (key) => {
// if rail collapsed, expand rail first to reveal submenu
if (!isMobile && collapsed) {
setCollapsed(false);
setOpenMap((m) => ({ ...m, [key]: true }));