Download next.js/test/integration/app-aspath/pages/_app.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 346 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/integration/app-aspath/pages/_app.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/integration/app-aspath/pages/_app.js
-
curl -L -o _app.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/integration/app-aspath/pages/_app.js
346 Bytes
| import React from 'react' | |
| import App from 'next/app' | |
| export default class MyApp extends App { | |
| // find this | |
| static async getInitialProps({ ctx }) { | |
| const { query, pathname, asPath } = ctx | |
| return { url: { query, pathname, asPath } } | |
| } | |
| render() { | |
| const { Component, url } = this.props | |
| return <Component url={url} /> | |
| } | |
| } | |