chore: initialize WanderQ MiniAPP 2.0 repository
This commit is contained in:
10
apps/api/src/destination-page.ts
Normal file
10
apps/api/src/destination-page.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export const DESTINATION_PAGE_CONFIG_ID = "destination-home";
|
||||
export const DESTINATION_RECOMMENDATION_LIMIT = 4;
|
||||
|
||||
export function normalizeDestinationRecommendationIds(value: unknown) {
|
||||
if (!Array.isArray(value)) return [];
|
||||
return [...new Set(value.filter((item): item is string => typeof item === "string" && item.trim().length > 0).map((item) => item.trim()))].slice(
|
||||
0,
|
||||
DESTINATION_RECOMMENDATION_LIMIT,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user