1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/mirrors-Semi-Design

Клонировать/Скачать
gatsby-browser.js 958
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
伍浩威 Отправлено 25.10.2021 22:52 f76bd58
/**
* Implement Gatsby's Browser APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/browser-apis/
*/
// You can delete this file if you're not using it
import React from 'react';
import Layout from './src/components/layout';
export const wrapPageElement = ({ element, props }) => <Layout {...props}>{element}</Layout>;
export const onRouteUpdate = ({ location, prevLocation }) => {
// console.log("new pathname", location.pathname)
// console.log("old pathname", prevLocation ? prevLocation.pathname : null)
};
export const onPreRouteUpdate = ({ location, prevLocation }) => {
// console.log("Gatsby started to change location to", location.pathname)
// console.log("Gatsby started to change location from", prevLocation ? prevLocation.pathname : null)
};
export const shouldUpdateScroll = ({ routerProps: { location }, getSavedScrollPosition }) => {
if (location.hash) {
return false;
}
return true;
};

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/mirrors-Semi-Design.git
git@api.gitlife.ru:oschina-mirror/mirrors-Semi-Design.git
oschina-mirror
mirrors-Semi-Design
mirrors-Semi-Design
main