Skip to content

Commit

Permalink
Modified app/components/TaskPanel.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
birdup000 committed Dec 23, 2024
1 parent e2e5d7e commit a02d655
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions app/components/TaskPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ const TaskPanel: React.FC = () => {
filteredAndSortedTasks
} = useSearch(tasks);

useEffect(() => {
const initializePanel = async () => {
useEffect(() =>{
const initializePanel = async () =>{
try {
setMounted(true);
console.log('TaskPanel: Initializing with auth state:', { token, noAuth });
Expand All @@ -81,7 +81,14 @@ const TaskPanel: React.FC = () => {
return;
}

await new Promise(resolve => setTimeout(resolve, 100));
// Immediately initialize if noAuth is true
if (noAuth) {
setIsInitialized(true);
console.log('TaskPanel: Initialization complete (noAuth)');
return;
}

await new Promise(resolve =>setTimeout(resolve, 100));
setIsInitialized(true);
console.log('TaskPanel: Initialization complete');
} catch (err) {
Expand Down

0 comments on commit a02d655

Please sign in to comment.