feat: images upload
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
export function formatEuAddress(street: string, city: string, regionName: string): string {
|
||||
return `${street}, ${city}, ${regionName}, EU`;
|
||||
}
|
||||
|
||||
export function formatAddress(options: {
|
||||
isEuResident: boolean;
|
||||
street?: string | null;
|
||||
city?: string | null;
|
||||
regionName?: string | null;
|
||||
customAddress?: string | null;
|
||||
}): string {
|
||||
const { isEuResident, street, city, regionName, customAddress } = options;
|
||||
|
||||
if (isEuResident && street && city && regionName) {
|
||||
return formatEuAddress(street, city, regionName);
|
||||
}
|
||||
|
||||
return customAddress ?? "";
|
||||
}
|
||||
Reference in New Issue
Block a user