JSPM

react-not-paid

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q36315F
  • License MIT

A React utility for freelancers whose clients aren't paying.

Package Exports

  • react-not-paid

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-not-paid) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

React-Not-Paid

Having trouble with your clients not paying for your work? React-Not-Paid will get you sorted!

This React utility will add opacity to a site's body tag and decrease it every day until the site completely fades away. Set a due date and customize the grace period you offer until the client's website fully disappears. It should now work reliably across time-zones, because it converts all dates to UTC and makes calculations thereafter.

Usage Instructions

Import this package by putting import notPaid from "react-not-paid" in your App.js.

Then, in your App.js's componentDidMount lifecycle method, call the notPaid function.

The first paramater is dueDate, which is an ISO date encoding (i.e. "YYYY-MM-DD") as a String.

The second parameter is gracePeriod, which is the number of days (e.g. 7, 14) it will take your client's site to fully disappear; this is an Integer value.

Example Usage

notPaid(dueDate, gracePeriod)
  componentDidMount = () => {
    notPaid("2019-02-26", 14);
  };

Author

Created by Rahul Desai (@rd825 on Github, @RDesai01 on Twitter)
Inspired by Dragoi Ciprian's vanilla JS version