fixed array list

This commit was merged in pull request #464.
This commit is contained in:
2023-10-27 20:37:25 -07:00
parent 540ad6f9ad
commit 6c698bc399
@@ -283,10 +283,14 @@ export default function FamilyProfile({ familyData, className }) {
// Get the current year
// const currentYear = new Date().getFullYear() - process.env.REACT_APP_FAMILY_MINIMUM_AGE;
const currentYear = new Date().getFullYear();
// Generate an array of years from the current year to (currentYear - 19)
const years = Array.from({ length: 19 }, (_, index) => currentYear - index);
// Calculate the current year and the year 3 years before the current year
const currentYear = new Date().getFullYear();
const startYear = currentYear - 3;
// Generate an array of years from 4 years before the current year to 18 years before the current year
const years = Array.from({ length: 15 }, (_, index) => startYear - index).reverse();
// const latestYears = years.slice(0, process.env.REACT_APP_FAMILY_YEAR_RANGE);
const months = [
{ id: "1", name: "January" },