feat: consolidar desenvolvimentos do portal InvestMoz
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
export type CompanyAnswers = Record<string, string>;
|
||||
export function companyComparisonUrl(
|
||||
base: string,
|
||||
answers: CompanyAnswers,
|
||||
field = 'answers',
|
||||
): string {
|
||||
return (
|
||||
base +
|
||||
'?' +
|
||||
new URLSearchParams(
|
||||
Object.entries(answers).map(([key, value]) => [
|
||||
`${field}[${key}]`,
|
||||
value,
|
||||
]),
|
||||
)
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user