Skip to content

Commit

Permalink
fix: public to base_url, remove unused & monaco fix
Browse files Browse the repository at this point in the history
  • Loading branch information
OliwiaGowor committed Sep 27, 2024
1 parent 47bef30 commit 5a01b5d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { useGetSchema } from 'hooks/useGetSchema';
import { v4 as uuid } from 'uuid';
import YamlWorker from './yaml.worker.js?worker';

self.MonacoEnvironment = {
window.MonacoEnvironment = {
getWorker: function(workerId, label) {
const getWorkerModule = (moduleUrl, label) => {
return new Worker(self.MonacoEnvironment.getWorkerUrl(moduleUrl), {
return new Worker(window.MonacoEnvironment.getWorkerUrl(moduleUrl), {
name: label,
type: 'module',
});
Expand Down
4 changes: 2 additions & 2 deletions src/state/preferences/themeAtom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ type AddLinkEffect = () => AtomEffect<Theme>;
export const addLinkEffect: AddLinkEffect = () => ({ onSet, setSelf }) => {
setSelf(param => {
const defaultValue = param as Theme;
applyThemeToLinkNode(defaultValue, import.meta.env.PUBLIC_URL);
applyThemeToLinkNode(defaultValue, import.meta.env.BASE_URL);
return defaultValue;
});

Expand All @@ -65,7 +65,7 @@ export const addLinkEffect: AddLinkEffect = () => ({ onSet, setSelf }) => {
if (newTheme === 'light_dark')
themeNew = isSystemThemeDark() ? 'dark' : 'default';
else themeNew = newTheme === 'sap_horizon' ? 'default' : newTheme.slice(12);
applyThemeToLinkNode(themeNew, import.meta.env.PUBLIC_URL);
applyThemeToLinkNode(themeNew, import.meta.env.BASE_URL);
});
};

Expand Down
1 change: 0 additions & 1 deletion src/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @import '~@sap-theming/theming-base-content/content/Base/baseLib/sap_fiori_3/css_variables.css';
@import '../shared/components/ResourceGraph/mixins';

@import './wizard-dialog.scss';
Expand Down

0 comments on commit 5a01b5d

Please sign in to comment.