Download wp-calypso/client/layout/guided-tours/docs/patch/clean-history.patch from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.15 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/layout/guided-tours/docs/patch/clean-history.patch
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/layout/guided-tours/docs/patch/clean-history.patch
-
curl -L -o clean-history.patch https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/layout/guided-tours/docs/patch/clean-history.patch
1.15 kB
| diff --git a/client/layout/guided-tours/index.js b/client/layout/guided-tours/index.js | |
| index 9dadd4e6a6..d442d108fd 100644 | |
| --- a/client/layout/guided-tours/index.js | |
| +++ b/client/layout/guided-tours/index.js | |
| import { | |
| } from 'state/ui/guided-tours/actions'; | |
| class GuidedTours extends Component { | |
| + componentDidMount() { | |
| + this.quit( {} ); | |
| + } | |
| + | |
| shouldComponentUpdate( nextProps ) { | |
| return this.props.tourState !== nextProps.tourState; | |
| } | |
| diff --git a/client/state/ui/guided-tours/actions.js b/client/state/ui/guided-tours/actions.js | |
| index 9292575e80..600e3815e6 100644 | |
| --- a/client/state/ui/guided-tours/actions.js | |
| +++ b/client/state/ui/guided-tours/actions.js | |
| export function requestGuidedTour( tour ) { | |
| // and saving that as the new history. | |
| function addSeenGuidedTour( getState, tourName, finished = false ) { | |
| - return savePreference( 'guided-tours-history', [ | |
| - ...getPreference( getState(), 'guided-tours-history' ), | |
| - { | |
| - timestamp: Date.now(), | |
| - tourName, | |
| - finished, | |
| - }, | |
| - ] ); | |
| + return savePreference( 'guided-tours-history', [] ); | |
| } | |
| export function resetGuidedToursHistory() { | |