Create useSelectedServer hook and use it where reset selected server is done

This commit is contained in:
Alejandro Celaya
2025-11-14 09:54:03 +01:00
parent b295240d28
commit 7890d0084a
6 changed files with 41 additions and 17 deletions

View File

@@ -23,7 +23,7 @@ export const provideServices = (bottle: Bottle, connect: ConnectDecorator) => {
bottle.serviceFactory('Home', () => Home);
bottle.decorator('Home', withoutSelectedServer);
bottle.decorator('Home', connect(['servers'], ['resetSelectedServer']));
bottle.decorator('Home', connect(['servers'], []));
bottle.factory('ShlinkWebComponentContainer', ShlinkWebComponentContainerFactory);
bottle.decorator('ShlinkWebComponentContainer', connect(['selectedServer', 'settings'], ['selectServer']));