mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-30 05:34:33 +08:00
[offers][fix] fix types for list some offers (#391)
This commit is contained in:
@ -1,8 +1,9 @@
|
|||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
|
||||||
import type { DashboardOffer } from '../../../types/offers';
|
import { convertCurrencyToString } from '~/utils/offers/currency';
|
||||||
import { convertCurrencyToString } from '../../../utils/offers/currency';
|
import { formatDate } from '~/utils/offers/time';
|
||||||
import { formatDate } from '../../../utils/offers/time';
|
|
||||||
|
import type { DashboardOffer } from '~/types/offers';
|
||||||
|
|
||||||
export type OfferTableRowProps = Readonly<{ row: DashboardOffer }>;
|
export type OfferTableRowProps = Readonly<{ row: DashboardOffer }>;
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import { trpc } from '~/utils/trpc';
|
|||||||
|
|
||||||
import OffersRow from './OffersRow';
|
import OffersRow from './OffersRow';
|
||||||
|
|
||||||
import type { DashboardOffer, Paging } from '~/types/offers';
|
import type { DashboardOffer, GetOffersResponse, Paging } from '~/types/offers';
|
||||||
|
|
||||||
const NUMBER_OF_OFFERS_IN_PAGE = 10;
|
const NUMBER_OF_OFFERS_IN_PAGE = 10;
|
||||||
export type OffersTableProps = Readonly<{
|
export type OffersTableProps = Readonly<{
|
||||||
@ -52,18 +52,7 @@ export default function OffersTable({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
{
|
{
|
||||||
onSuccess: (response) => {
|
onSuccess: (response: GetOffersResponse) => {
|
||||||
// Const filteredData = response.data.map((res) => {
|
|
||||||
// return {
|
|
||||||
// company: res.company.name,
|
|
||||||
// date: res.monthYearReceived,
|
|
||||||
// id: res.id,
|
|
||||||
// profileId: res.profileId,
|
|
||||||
// income: res.income,
|
|
||||||
// title: res.title,
|
|
||||||
// yoe: res.totalYoe,
|
|
||||||
// };
|
|
||||||
// });
|
|
||||||
setOffers(response.data);
|
setOffers(response.data);
|
||||||
setPagination(response.paging);
|
setPagination(response.paging);
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user