Skip to content

[React] Remove dependency on moment from components #1140

Description

@sawyerh

Mayflower version: 10.0.0-alpha.2

We recently added the FooterSlim component to our application and noticed the bundle size increased about 100kb. This seems to mostly be due to the inclusion of moment as a dependency in this component, which comes with a large set of locale files:

image

It looks like the footer component uses moment as a way to reference the current year in the copyright text, in which case something like the following should work without requiring an external dependency:

new Date().getFullYear()

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getFullYear

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions