Skip to content

Create refactor GHG child page path into a component #17

@gndclouds

Description

@gndclouds

In the GHG Weekly, Monthly, and Yearly pages, refactor the following into a component.

  const { asPath } = useRouter();
var afterWithout = asPath.substr(1, asPath.lastIndexOf("/"));
  const DataRouteURL = afterWithout;
  if (error) return <div>Failed to load</div>;
  if (!data) return <Layout>LOADING</Layout>;

Pages that will need to be updated

  • /co2/weekly
  • /co2/monthly
  • /co2/yearly
  • /ch4/monthly
  • /sf6/monthly
  • /sf6/yearly
  • /n2o/monthly
  • /n2o/yearly

And update GHG index pages

  • /sf6/monthly
  • /sf6/yearly
  • /n2o/monthly
  • /n2o/yearly

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions