refactoring components to match the optimized projections
This commit is contained in:
@@ -16,7 +16,15 @@ export interface LocationCardProps {
|
||||
}
|
||||
|
||||
export const LocationCard: FC<LocationCardProps> = ({ location, currency }) => {
|
||||
const { _id, name, yearMonth, bills, seenByTenant, utilBillsProofOfPaymentAttachment } = location;
|
||||
const {
|
||||
_id,
|
||||
name,
|
||||
yearMonth,
|
||||
bills,
|
||||
seenByTenant,
|
||||
// NOTE: only the fileName is projected from the DB to reduce data transfer
|
||||
utilBillsProofOfPaymentAttachment
|
||||
} = location;
|
||||
|
||||
const t = useTranslations("home-page.location-card");
|
||||
const currentLocale = useLocale();
|
||||
|
||||
Reference in New Issue
Block a user