File size: 357 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import React from 'react'
import Router from 'next/router'

export default class extends React.Component {
  constructor(...args) {
    super(...args)
    this.state = {}
  }

  componentDidMount() {
    const asPath = Router.asPath
    this.setState({ asPath })
  }

  render() {
    return <div className="as-path-content">{this.state.asPath}</div>
  }
}