Skip to content

Commit

Permalink
Revert "perf(general): add performance improvement changes (#471)" (#472
Browse files Browse the repository at this point in the history
)

This reverts commit 2f06a69.
  • Loading branch information
Frodigo committed Mar 8, 2022
1 parent 6283e68 commit a1d61cc
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
3 changes: 0 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,4 @@ module.exports = {
'@vue-storefront/eslint-config-vue',
'@vue-storefront/eslint-config-jest',
],
rules: {
"@typescript-eslint/no-floating-promises": "off"
}
}
2 changes: 1 addition & 1 deletion packages/composables/src/factories/useStoreFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function useStoreFactory<STORES, STORE,
const change = async (store: ComposableFunctionArgs<STORE>): Promise<void> => {
loading.value = true;
try {
_factoryParams.change(store);
await _factoryParams.change(store);
} finally {
loading.value = false;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/theme/components/CurrencySelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default defineComponent({
const isCurrencyModalOpen = ref(false);
const availableCurrencies = computed(() => currencies.value?.available_currency_codes || []);
const availableCurrencies = computed(() => currencies.value?.available_currency_codes);
return {
currentCurrencySymbol,
Expand Down
2 changes: 1 addition & 1 deletion packages/theme/composables/useMagentoConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const useMagentoConfiguration: UseMagentoConfiguration = () => {

const selectedStore = computed<string | undefined>(() => app.$cookies.get(cookieNames.storeCookieName));

const loadConfiguration: (params: { updateCookies: boolean; updateLocale: boolean; }) => void = (params = {
const loadConfiguration: (params: { updateCookies: boolean; updateLocale: boolean; }) => Promise<void> = async (params = {
updateCookies: false,
updateLocale: false,
}) => {
Expand Down
7 changes: 4 additions & 3 deletions packages/theme/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@ export default defineComponent({
setup() {
const route = useRoute();
const { load: loadUser } = useUser();
const { loadConfiguration } = useMagentoConfiguration();
onMounted(() => {
loadConfiguration();
loadUser();
onSSR(async () => {
await loadConfiguration();
await loadUser();
});
return {
Expand Down

0 comments on commit a1d61cc

Please sign in to comment.