Skip to content

Commit

Permalink
chore(apps): uhm, small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
itschip committed Jan 1, 2024
1 parent 43fc9d2 commit e3500cb
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
6 changes: 3 additions & 3 deletions apps/game/server/bridge/qbx/qbx-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export class QBXFramework implements Strategy {
});
});

on("QBCore:Server:OnPlayerUnload", async () => {
on('QBCore:Server:OnPlayerUnload', async () => {
await PlayerService.handleUnloadPlayerEvent(global.source);
})
});
}

onStart(): void {
Expand All @@ -53,4 +53,4 @@ export class QBXFramework implements Strategy {
}
});
}
}
}
4 changes: 1 addition & 3 deletions apps/game/server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import { config as resourceConfig } from '@npwd/config/server';
export const config = resourceConfig;
import { registerCommands } from './commands/registerCommands';


console.log(config);

// This is ugly as fuck and we need to import things in a order that makes sense
// Setup controllers
//
//import './db/pool';
Expand Down
5 changes: 2 additions & 3 deletions apps/phone/src/common/hooks/useExternalApps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ import {
__federation_method_getRemote,
__federation_method_setRemote,
__federation_method_unwrapDefault,
// @ts-ignore - This is Vite federation magic
// @ts-ignore - This is virtual modules from the vite plugin. I guess they forgot to add defs.
} from '__federation__';
import { EnvMode } from '@utils/config';
import { NuiProvider } from 'fivem-nui-react-lib';

const useExternalAppsAction = () => {
const loadScript = async (url: string) => {
Expand Down Expand Up @@ -59,7 +58,7 @@ const useExternalAppsAction = () => {

const appConfig = m();
const config = appConfig;
config.Component = (props: object) => React.createElement(config.app);
config.Component = (props: object) => React.createElement(config.app, props);

const Provider = createExternalAppProvider(config);

Expand Down
2 changes: 1 addition & 1 deletion apps/phone/src/common/hooks/useNuiEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ export const useNuiEvent = <T = any>(app: string, action: string, handler: (data
// Remove Event Listener on component cleanup
return () => window.removeEventListener('message', eventListener);
}, [action, app]);
};
};
1 change: 1 addition & 0 deletions apps/phone/src/os/apps/utils/externalAppBoundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const Container = styled.div<{ background: string; color: string }>`
`;

interface ExternalAppBoundaryProps {
children: React.ReactNode;
color: string;
background: string;
t: TFunction;
Expand Down

0 comments on commit e3500cb

Please sign in to comment.