Skip to content

Instantly share code, notes, and snippets.

@JWLangford
Last active April 15, 2021 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JWLangford/1631ab0a8ef3865f807d4c5c3e00f730 to your computer and use it in GitHub Desktop.
Save JWLangford/1631ab0a8ef3865f807d4c5c3e00f730 to your computer and use it in GitHub Desktop.
const buildStateUser = (user: IUser): IUserState => {
return {
...user,
paymentNeeded: Boolean(user.billingInfo),
daysRemainingInTrial: differenceInDays(user.created, user.trialEnds),
hasEdited: false,
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment