Skip to content

Commit faf460e

Browse files
authored
fix: Maintainability issues (#27)
* fix: Maintainability issues * feedback * fixed sonar check * fix sonar issues
1 parent 56fc1b6 commit faf460e

File tree

8 files changed

+24
-360
lines changed

8 files changed

+24
-360
lines changed

packages/react-native/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Formbricks } from "@/components/formbricks";
21
import { CommandQueue } from "@/lib/common/command-queue";
32
import { Logger } from "@/lib/common/logger";
43
import * as Actions from "@/lib/survey/action";
@@ -39,4 +38,4 @@ export const logout = async (): Promise<void> => {
3938
await queue.wait();
4039
};
4140

42-
export default Formbricks;
41+
export { Formbricks as default } from "@/components/formbricks";

packages/react-native/src/lib/common/file-upload.ts

Lines changed: 0 additions & 146 deletions
This file was deleted.

packages/react-native/src/lib/common/setup.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ const shouldSyncConfig = (
226226
): boolean => {
227227
return Boolean(
228228
existingConfig?.environment &&
229-
existingConfig.environmentId === configInput.environmentId &&
230-
existingConfig.appUrl === configInput.appUrl
229+
existingConfig.environmentId === configInput.environmentId &&
230+
existingConfig.appUrl === configInput.appUrl
231231
);
232232
};
233233

@@ -412,7 +412,7 @@ export const handleErrorOnFirstSetup = async (e: {
412412
const initialErrorConfig: Partial<TConfig> = {
413413
status: {
414414
value: "error",
415-
expiresAt: new Date(new Date().getTime() + 10 * 60000), // 10 minutes in the future
415+
expiresAt: new Date(Date.now() + 10 * 60000), // 10 minutes in the future
416416
},
417417
};
418418

packages/react-native/src/lib/common/tests/file-upload.test.ts

Lines changed: 0 additions & 186 deletions
This file was deleted.

0 commit comments

Comments
 (0)