mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-28 12:43:12 +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 type { DashboardOffer } from '../../../types/offers';
|
||||
import { convertCurrencyToString } from '../../../utils/offers/currency';
|
||||
import { formatDate } from '../../../utils/offers/time';
|
||||
import { convertCurrencyToString } from '~/utils/offers/currency';
|
||||
import { formatDate } from '~/utils/offers/time';
|
||||
|
||||
import type { DashboardOffer } from '~/types/offers';
|
||||
|
||||
export type OfferTableRowProps = Readonly<{ row: DashboardOffer }>;
|
||||
|
||||
|
@ -9,7 +9,7 @@ import { trpc } from '~/utils/trpc';
|
||||
|
||||
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;
|
||||
export type OffersTableProps = Readonly<{
|
||||
@ -52,18 +52,7 @@ export default function OffersTable({
|
||||
},
|
||||
],
|
||||
{
|
||||
onSuccess: (response) => {
|
||||
// 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,
|
||||
// };
|
||||
// });
|
||||
onSuccess: (response: GetOffersResponse) => {
|
||||
setOffers(response.data);
|
||||
setPagination(response.paging);
|
||||
},
|
||||
|
Reference in New Issue
Block a user