mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2026-04-01 10:01:43 +08:00
[offers][feat] add token check to profile and add company filter to table (#373)
* [offers][feat] add token check to profile, company filter to table and currency formatter * [offers][feat] add currency formatter
This commit is contained in:
@@ -14,16 +14,16 @@ type Props = Readonly<{
|
||||
|
||||
export default function OfferCard({
|
||||
offer: {
|
||||
companyName = 'Meta',
|
||||
jobTitle = 'Senior Engineer',
|
||||
jobLevel,
|
||||
location = 'Singapore',
|
||||
receivedMonth = 'Jun 2021',
|
||||
totalCompensation = '350.1k',
|
||||
base = '0k',
|
||||
stocks = '0k',
|
||||
bonus = '0k',
|
||||
base,
|
||||
bonus,
|
||||
companyName,
|
||||
duration,
|
||||
jobTitle,
|
||||
jobLevel,
|
||||
location,
|
||||
receivedMonth,
|
||||
totalCompensation,
|
||||
stocks,
|
||||
monthlySalary,
|
||||
negotiationStrategy,
|
||||
otherComment,
|
||||
|
||||
@@ -19,7 +19,10 @@ export type OffersTableProps = Readonly<{
|
||||
companyFilter: string;
|
||||
jobTitleFilter: string;
|
||||
}>;
|
||||
export default function OffersTable({ jobTitleFilter }: OffersTableProps) {
|
||||
export default function OffersTable({
|
||||
companyFilter,
|
||||
jobTitleFilter,
|
||||
}: OffersTableProps) {
|
||||
const [currency, setCurrency] = useState('SGD'); // TODO: Detect location
|
||||
const [selectedTab, setSelectedTab] = useState(YOE_CATEGORY.ENTRY);
|
||||
const [pagination, setPagination] = useState<PaginationType>({
|
||||
@@ -42,10 +45,9 @@ export default function OffersTable({ jobTitleFilter }: OffersTableProps) {
|
||||
[
|
||||
'offers.list',
|
||||
{
|
||||
// Company: companyFilter, // TODO
|
||||
companyId: companyFilter,
|
||||
limit: NUMBER_OF_OFFERS_IN_PAGE,
|
||||
|
||||
location: 'Singapore, Singapore',
|
||||
location: 'Singapore, Singapore', // TODO: Geolocation
|
||||
offset: pagination.currentPage - 1,
|
||||
sortBy: '-monthYearReceived',
|
||||
title: jobTitleFilter,
|
||||
|
||||
@@ -137,11 +137,11 @@ type EducationDisplay = {
|
||||
export type OfferEntity = {
|
||||
base?: string;
|
||||
bonus?: string;
|
||||
companyName: string;
|
||||
companyName?: string;
|
||||
duration?: string;
|
||||
id?: string;
|
||||
jobLevel?: string;
|
||||
jobTitle: string;
|
||||
jobTitle?: string;
|
||||
location?: string;
|
||||
monthlySalary?: string;
|
||||
negotiationStrategy?: string;
|
||||
|
||||
Reference in New Issue
Block a user