From 6b19a618f3e4e20814745d2be8f364983ba41407 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Tue, 24 Sep 2024 19:45:15 +0530 Subject: [PATCH] fix: build error (#1254) --- web/app/profile/page.tsx | 2 +- .../layouts/auth-layout/workspace-wrapper.tsx | 14 +++-------- web/ee/constants/issues.ts | 2 ++ web/package.json | 3 --- yarn.lock | 24 ------------------- 5 files changed, 6 insertions(+), 39 deletions(-) diff --git a/web/app/profile/page.tsx b/web/app/profile/page.tsx index ccbd62446d..70e53ca98d 100644 --- a/web/app/profile/page.tsx +++ b/web/app/profile/page.tsx @@ -34,8 +34,8 @@ import { USER_ROLES } from "@/constants/workspace"; import { useUser, useUserSettings } from "@/hooks/store"; // import { ProfileSettingsLayout } from "@/layouts/settings-layout"; // layouts -import { FileService } from "@/services/file.service"; import { ENABLE_LOCAL_DB_CACHE } from "@/plane-web/constants/issues"; +import { FileService } from "@/services/file.service"; // services // types diff --git a/web/core/layouts/auth-layout/workspace-wrapper.tsx b/web/core/layouts/auth-layout/workspace-wrapper.tsx index ee09fbf70e..bb879e0f3b 100644 --- a/web/core/layouts/auth-layout/workspace-wrapper.tsx +++ b/web/core/layouts/auth-layout/workspace-wrapper.tsx @@ -22,11 +22,8 @@ import { EUserPermissions, EUserPermissionsLevel } from "@/plane-web/constants/u import { useFlag, useIssueTypes, useWorkspaceFeatures, useWorkspaceProjectStates } from "@/plane-web/hooks/store"; import { useFeatureFlags } from "@/plane-web/hooks/store/use-feature-flags"; // images -<<<<<<< HEAD import { persistence } from "@/local-db/storage.sqlite"; -======= import { EWorkspaceFeatures } from "@/plane-web/types/workspace-feature"; ->>>>>>> 4ec52d5a6c3ca41e5c6b0c0069dd02a36fd3467f import PlaneBlackLogo from "@/public/plane-logos/black-horizontal-with-blue-logo.png"; import PlaneWhiteLogo from "@/public/plane-logos/white-horizontal-with-blue-logo.png"; import WorkSpaceNotAvailable from "@/public/workspace/workspace-not-available.png"; @@ -125,7 +122,6 @@ export const WorkspaceAuthWrapper: FC = observer((props) { revalidateIfStale: false, revalidateOnFocus: false } ); -<<<<<<< HEAD // initialize the local database const { isLoading: isDBInitializing } = useSWRImmutable( workspaceSlug ? `WORKSPACE_DB_${workspaceSlug}` : null, @@ -138,14 +134,14 @@ export const WorkspaceAuthWrapper: FC = observer((props) return true; } : null -======= + ); + const isIssueTypesEnabled = useFlag(workspaceSlug?.toString(), "ISSUE_TYPE_DISPLAY", false); // fetching all issue types for the workspace useSWR( workspaceSlug && isIssueTypesEnabled ? `WORKSPACE_ISSUE_TYPES_${workspaceSlug}_${isIssueTypesEnabled}` : null, workspaceSlug && isIssueTypesEnabled ? () => fetchAllIssueTypes(workspaceSlug.toString()) : null, { revalidateIfStale: false, revalidateOnFocus: false } ->>>>>>> 4ec52d5a6c3ca41e5c6b0c0069dd02a36fd3467f ); const handleSignOut = async () => { @@ -162,11 +158,7 @@ export const WorkspaceAuthWrapper: FC = observer((props) const currentWorkspaceInfo = workspaceSlug && workspaceInfoBySlug(workspaceSlug.toString()); // if list of workspaces are not there then we have to render the spinner -<<<<<<< HEAD - if (allWorkspaces === undefined || loader || isDBInitializing) { -======= - if ((flagsLoader && !flagsError) || allWorkspaces === undefined || loader) { ->>>>>>> 4ec52d5a6c3ca41e5c6b0c0069dd02a36fd3467f + if ((flagsLoader && !flagsError) || allWorkspaces === undefined || loader || isDBInitializing) { return (
diff --git a/web/ee/constants/issues.ts b/web/ee/constants/issues.ts index 65620554da..00431b714a 100644 --- a/web/ee/constants/issues.ts +++ b/web/ee/constants/issues.ts @@ -46,3 +46,5 @@ export const filterActivityOnSelectedFilters = ( activity.filter((activity) => filters.some((filter) => shouldRenderActivity(activity, filter))); export { EActivityFilterType }; + +export const ENABLE_LOCAL_DB_CACHE = true; diff --git a/web/package.json b/web/package.json index d6ff552f2c..512f4e1086 100644 --- a/web/package.json +++ b/web/package.json @@ -33,11 +33,8 @@ "@plane/ui": "*", "@popperjs/core": "^2.11.8", "@sentry/nextjs": "^8", -<<<<<<< HEAD "@sqlite.org/sqlite-wasm": "^3.46.0-build2", -======= "@todesktop/client-core": "^1.9.0", ->>>>>>> 4ec52d5a6c3ca41e5c6b0c0069dd02a36fd3467f "axios": "^1.7.4", "clsx": "^2.0.0", "cmdk": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index 8407e30ce0..87107824d8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10959,31 +10959,7 @@ streamsearch@^1.1.0: resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== -<<<<<<< HEAD -streamx@^2.15.0, streamx@^2.20.0: - version "2.20.1" - resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.20.1.tgz#471c4f8b860f7b696feb83d5b125caab2fdbb93c" - integrity sha512-uTa0mU6WUC65iUvzKH4X9hEdvSW7rbPxPtwfWiLMSj3qTdQbAiUboZTxauKfpFuGIGa1C2BYijZ7wgdUXICJhA== - dependencies: - fast-fifo "^1.3.2" - queue-tick "^1.0.1" - text-decoder "^1.1.0" - optionalDependencies: - bare-events "^2.2.0" - "string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: -======= -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: ->>>>>>> 4ec52d5a6c3ca41e5c6b0c0069dd02a36fd3467f version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==