Skip to content

Commit

Permalink
🚚 Moving TutorialProvider to ACL since EDS dependency here was causin…
Browse files Browse the repository at this point in the history
…g issues
  • Loading branch information
mariush2 committed Jul 17, 2024
1 parent f701c29 commit 973fd7e
Show file tree
Hide file tree
Showing 19 changed files with 181 additions and 1,848 deletions.
333 changes: 170 additions & 163 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"test:coverage": "vitest run --coverage",
"setup-husky": "husky install",
"precommit": "npx lint-staged",
"build": "rollup -c && tsc --project tsconfig.build.json && resolve-tspaths --project tsconfig.build.json",
"build": "rollup -c --bundleConfigAsCjs && tsc --project tsconfig.build.json && resolve-tspaths --project tsconfig.build.json",
"build:ci": "rm -rf lib dist && npm run build-components",
"build-and-use": "node tooling/build-and-use.mjs",
"brute-coverage": "node tooling/brute-coverage.mjs"
Expand All @@ -51,7 +51,9 @@
"jwt-decode": "^4.0.0"
},
"devDependencies": {
"@equinor/eds-core-react": "^0.40.1",
"@equinor/eds-icons": "^0.21.0",
"@equinor/eds-tokens": "^0.9.2",
"@faker-js/faker": "^8.4.1",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3",
Expand Down Expand Up @@ -113,8 +115,6 @@
"vitest": "^1.2.2"
},
"peerDependencies": {
"@equinor/eds-core-react": "*",
"@equinor/eds-icons": "*",
"@tanstack/react-query": "*",
"framer-motion": "*",
"react": "^18.2.0",
Expand Down
4 changes: 2 additions & 2 deletions src/api/core/OpenAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
type Headers = Record<string, string>;

const environmentName = getEnvironmentName(
import.meta.env.VITE_ENVIRONMENT_NAME
import.meta.env?.VITE_ENVIRONMENT_NAME
);
const noLocalhostEnvironmentName =
environmentName === 'localhost' ? 'development' : environmentName;
Expand Down Expand Up @@ -98,7 +98,7 @@ const getPortalProdToken = async () => {
};

export const OpenAPI_SAM: OpenAPIConfig = {
BASE: getApiUrl(import.meta.env.VITE_API_URL),
BASE: getApiUrl(import.meta.env?.VITE_API_URL),
VERSION: '1.0',
WITH_CREDENTIALS: false,
CREDENTIALS: 'include',
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useReleaseNotesQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface ReleaseNotesQueryProps {

export function useReleaseNotesQuery(options?: ReleaseNotesQueryProps) {
const applicationName =
options?.overrideAppName ?? getAppName(import.meta.env.VITE_NAME);
options?.overrideAppName ?? getAppName(import.meta.env?.VITE_NAME);

return useQuery<ReleaseNote[]>({
queryKey: ['get-all-release-notes'],
Expand Down
4 changes: 2 additions & 2 deletions src/providers/FeatureToggleProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ export const FeatureToggleProvider: FC<FeatureToggleProviderProps> = ({
overrideEnvironment,
}) => {
const applicationName =
overrideAppName ?? getAppName(import.meta.env.VITE_NAME);
overrideAppName ?? getAppName(import.meta.env?.VITE_NAME);
const environmentName =
overrideEnvironment ??
getEnvironmentName(import.meta.env.VITE_ENVIRONMENT_NAME);
getEnvironmentName(import.meta.env?.VITE_ENVIRONMENT_NAME);

const {
data: featureToggle,
Expand Down
182 changes: 0 additions & 182 deletions src/providers/TutorialProvider/TutorialDialog.tsx

This file was deleted.

8 changes: 0 additions & 8 deletions src/providers/TutorialProvider/TutorialProvider.const.ts

This file was deleted.

33 changes: 0 additions & 33 deletions src/providers/TutorialProvider/TutorialProvider.hooks.ts

This file was deleted.

Loading

0 comments on commit 973fd7e

Please sign in to comment.