fix: ChoresOverview does not parse — hook inserted into an object literal

`CHORE_STATUS` is a module-level object literal, and a `useTranslation`
call ended up inside it:

    const CHORE_STATUS = {
      const { t } = useTranslation('chores')
      NO_DUE_DATE: 'No due date',

That is a syntax error, so the file cannot be parsed at all. It does not
break the build because nothing imports `ChoresOverview` — vite never
compiles it — but it breaks eslint, editors, and anything else that walks
the whole tree.

The hook moves into the component, which is where the file's `t()` calls
actually live.

This one arrived with #210, the same way #216 brought the ActivitiesCard
crash: my tooling wrote the hook in mechanically and nothing downstream
parsed the result. Both are now covered by the `no-undef` pass I described
in the other commit — it reports the parse error too.
This commit is contained in:
everysingletear
2026-08-15 17:02:02 +08:00
parent d813971809
commit 64aca507af

View File

@@ -33,7 +33,6 @@ import DateModal from './Modals/Inputs/DateModal'
// enum for chore status:
const CHORE_STATUS = {
const { t } = useTranslation('chores')
NO_DUE_DATE: 'No due date',
DUE_SOON: 'Soon',
DUE_NOW: 'Due',
@@ -41,6 +40,7 @@ const CHORE_STATUS = {
}
const ChoresOverview = () => {
const { t } = useTranslation('chores')
const [chores, setChores] = useState([])
const [filteredChores, setFilteredChores] = useState([])
const [performers, setPerformers] = useState([])