Skip to content

Commit 4933988

Browse files
authored
Merge pull request #2080 from hackforla/rc.fix-last-updated-incorrect-year
don't hardcode 2025 in lastUpdated
2 parents f0efd37 + fb7fcff commit 4933988

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/components/layout/Footer/LastUpdated.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ function LastUpdated() {
3333

3434
useEffect(() => {
3535
const getLastUpdated = async () => {
36-
const getLastUpdatedSQL = 'select max(createddate) from requests_2025;';
36+
const currentYear = new Date().getFullYear();
37+
const getLastUpdatedSQL = `select max(createddate) from requests_${currentYear};`;
3738

3839
const lastUpdatedAsArrowTable = await conn.query(getLastUpdatedSQL);
3940
const results = ddbh.getTableData(lastUpdatedAsArrowTable);

0 commit comments

Comments
 (0)