Skip to content

Commit

Permalink
Merge pull request #67 from birdup000/issue-66
Browse files Browse the repository at this point in the history
Fix #66: Very sluggish and clunky
  • Loading branch information
birdup000 authored Dec 23, 2024
2 parents e2e5d7e + a02d655 commit de560bb
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 de560bb

Please sign in to comment.