Skip to content

Commit f12ddd9

Browse files
committed
feedback
1 parent dfa6669 commit f12ddd9

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

special-pages/pages/new-tab/app/omnibar/components/PersistentOmnibarValuesProvider.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export function useQueryWithLocalPersistence(tabId) {
5050

5151
invariant(
5252
useContext(OmnibarContext).state.status === 'ready',
53-
'Cannot use `useQueryWithPersistence` without Omnibar Service being ready.',
53+
'Cannot use `useQueryWithLocalPersistence` without Omnibar Service being ready.',
5454
);
5555

5656
const [query, setQuery] = useState(() => terms?.byId(tabId) || '');
@@ -63,7 +63,7 @@ export function useQueryWithLocalPersistence(tabId) {
6363
}
6464
setQuery(term);
6565
},
66-
[tabId],
66+
[tabId, terms],
6767
);
6868

6969
return /** @type {const} */ ([query, setter]);
@@ -106,7 +106,7 @@ export function useModeWithLocalPersistence(tabId, defaultMode) {
106106
}
107107
setState(v.data.mode);
108108
});
109-
}, [service, tabId]);
109+
}, [service, tabId, values]);
110110

111111
return mode;
112112
}

special-pages/pages/new-tab/app/tabs/tabs.service.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,6 @@ export class TabsService {
3131
return 'TabsService';
3232
}
3333

34-
/**
35-
* @returns {Promise<{data: Tabs; config: null}>}
36-
* @internal
37-
*/
38-
async getInitial() {
39-
const tabs = await this.tabsService.fetchInitial();
40-
return { data: tabs, config: null };
41-
}
42-
4334
/**
4435
* @param {(evt: {data: Tabs, source: import('../service.js').InvocationSource}) => void} cb
4536
* @internal
@@ -60,7 +51,6 @@ export class TabsService {
6051
*/
6152
snapshot() {
6253
if (!this.tabsService.data) throw new Error('unreachable');
63-
console.log('did read');
6454
return this.tabsService.data;
6555
}
6656
}

0 commit comments

Comments
 (0)