File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ export default function TaskPage() {
6363
6464 return (
6565 < div className = "" >
66- < Tabs variant = 'soft-rounded' colorScheme = 'green' h = '80%' >
66+ < Tabs variant = 'soft-rounded' colorScheme = 'green' h = '80%' index = { activeTaskCategory } defaultIndex = { activeTaskCategory } >
6767 < TaskCategoryList />
6868 {
6969 loading || taskCategoryList . length <= 0 ? (
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { Task } from '../helpers/task';
44import { task , taskCategory } from '../types/taskapi' ;
55import { SettingsStore } from '../helpers/DBStores' ;
66import settings from './settings' ;
7+ import { get_access_token } from '../helpers/invoker' ;
78
89
910// const loggedInState = atom({
@@ -28,7 +29,7 @@ const userProfileState = atom<UserProfile | null>({
2829
2930const accessTokenState = atom < string | null > ( {
3031 key : 'accessTokenState' ,
31- default : null ,
32+ default : ( await get_access_token ( ) ) . access_token ,
3233} ) ;
3334
3435const taskObjectState = atom < Task > ( {
@@ -85,7 +86,8 @@ const loggedInSelector = selector({
8586 key : 'loggedInSelector' ,
8687 get : ( { get } ) => {
8788 const loggedIn = get ( userProfileState ) ;
88- return loggedIn && loggedIn . email != null && loggedIn . email != "" ;
89+ const accessToken = get ( accessTokenState ) ;
90+ return loggedIn && loggedIn . email != null && loggedIn . email != "" && accessToken ;
8991 } ,
9092} ) ;
9193
You can’t perform that action at this time.
0 commit comments