Skip to content

Commit

Permalink
Merge pull request learningequality#11474 from KshitijThareja/11330
Browse files Browse the repository at this point in the history
Replace KResponsiveWindow mixin by useKResponsiveWindow composable
  • Loading branch information
marcellamaki authored Nov 13, 2023
2 parents cb1a8ea + 6a0feef commit 0fef16d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,19 @@
import LanguageSwitcherModal from 'kolibri.coreVue.components.LanguageSwitcherModal';
import commonCoreStrings from 'kolibri.coreVue.mixins.commonCoreStrings';
import AppError from 'kolibri-common/components/AppError';
import responsiveWindowMixin from 'kolibri.coreVue.mixins.responsiveWindowMixin';
import useKResponsiveWindow from 'kolibri.coreVue.composables.useKResponsiveWindow';
import { availableLanguages, currentLanguage } from 'kolibri.utils.i18n';
import { FooterMessageTypes } from '../constants';
export default {
name: 'OnboardingStepBase',
components: { AppError, CoreLogo, LanguageSwitcherModal },
inject: ['wizardService'],
mixins: [commonCoreStrings, responsiveWindowMixin],
mixins: [commonCoreStrings],
setup() {
const { windowIsSmall } = useKResponsiveWindow();
return { windowIsSmall };
},
props: {
/**
* The event sent to the state machine when the user clicks GO BACK.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import { interpret } from 'xstate';
import { mapState } from 'vuex';
import commonCoreStrings from 'kolibri.coreVue.mixins.commonCoreStrings';
import responsiveWindowMixin from 'kolibri.coreVue.mixins.responsiveWindowMixin';
import useKResponsiveWindow from 'kolibri.coreVue.composables.useKResponsiveWindow';
import { checkCapability } from 'kolibri.utils.appCapabilities';
import Lockr from 'lockr';
import { wizardMachine } from '../machines/wizardMachine';
Expand All @@ -46,7 +46,11 @@
LoadingPage,
ErrorPage,
},
mixins: [commonCoreStrings, responsiveWindowMixin],
mixins: [commonCoreStrings],
setup() {
const { windowIsLarge } = useKResponsiveWindow();
return { windowIsLarge };
},
data() {
return {
service: interpret(wizardMachine),
Expand Down

0 comments on commit 0fef16d

Please sign in to comment.