1.0.5 • Published 8 months ago
@gamelord2011/age-js v1.0.5
Age.js
This is a simple NextJs component that calculates your age.
Installation
Install the package via npm:
npm install @gamelord2011/age-jspnpm:
pnpm i @gamelord2011/age-jsor yarn:
yarn add @gamelord2011/age-jsUsage
Import the Age component and use it in your NextJS application:
"use-client";
import Age from "@gamelord2011/age-js";
function App() {
return <Age />;
}
export default App;Environment Variable
Set the BIRTHDATE environment variable in the following format:
NEXT_PUBLIC_BIRTHDATE = '<your birthdate here>'Or just pass the birthdate argument through the component.