Skip to content

Commit

Permalink
Merge pull request #152 from xElementzx/npwd-1.7.1
Browse files Browse the repository at this point in the history
Fixes for NPWD 1.7.1+
  • Loading branch information
itschip authored Oct 1, 2023
2 parents 8c6fe5e + 2effd63 commit 74386d4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/server/services/account/account.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ export class AccountService {

t.afterCommit(() => {
emit(Broadcasts.RemovedSharedUser, account.toJSON());
emitNet(Broadcasts.RemovedSharedUser, user?.getSource(), account.toJSON());
if (user?.getSource())
emitNet(Broadcasts.RemovedSharedUser, user?.getSource(), account.toJSON());
});

t.commit();
Expand Down
19 changes: 15 additions & 4 deletions web/src/views/Mobile/Mobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { Heading6 } from '@components/ui/Typography/Headings';
import { GlobalSettingsProvider } from '@hooks/useGlobalSettings';
import { IPhoneSettings } from '@project-error/npwd-types';
import { BroadcastsWrapper } from '@hooks/useBroadcasts';
import { MemoryRouter } from 'react-router-dom';

const Container = styled.div`
color: #fff;
Expand Down Expand Up @@ -62,10 +63,20 @@ const MobileApp = (props: MobileAppProps) => {
<ThemeProvider theme={theme}>
<I18nextProvider i18n={i18n} defaultNS="pefcl">
<Container>
<React.Suspense fallback={<LoadingFallback message={i18n.t('Fetching data ..')} />}>
<MobileRoutes />
</React.Suspense>
<MobileFooter />
<MemoryRouter
initialEntries={[
'/bank/dashboard',
'/bank/accounts',
'/bank/transfer',
'/bank/invoices',
]}
initialIndex={0}
>
<React.Suspense fallback={<LoadingFallback message={i18n.t('Fetching data ..')} />}>
<MobileRoutes />
</React.Suspense>
<MobileFooter />
</MemoryRouter>
</Container>

{/* We don't need to show any fallback for the update component since it doesn't render anything anyway. */}
Expand Down
1 change: 0 additions & 1 deletion web/src/views/Mobile/Routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const MobileRoutes = () => {

return (
<>
<Route path={`${prefix}/`} exact component={MobileDashboardView} />
<Route path={`${prefix}/accounts`} component={MobileAccountsView} />
<Route path={`${prefix}/dashboard`} component={MobileDashboardView} />
<Route path={`${prefix}/transfer`} component={MobileTransferView} />
Expand Down

0 comments on commit 74386d4

Please sign in to comment.