created separet util. fun file for directory components

This commit is contained in:
Pramod Mahajan 2025-05-22 18:17:51 +05:30
parent c78f94b17f
commit 0cefb98ac1

View File

@ -0,0 +1,26 @@
import {useBuckets} from "../../hooks/useDirectory";
export const getEmailIcon = (type) => {
switch (type) {
case 'Work': return "bx bx-briefcase me-1 " ;
case 'Personal': return "bx bx-user me-1";
case 'support': return "bx headphone-mic me-1";
case 'billing': return "bx bx-receipt me-1";
default: return "bx bx-envelope me-1";
}
};
export const getPhoneIcon = (type) => {
switch (type) {
case 'Business': return "bx bx-phone me-1 ";
case 'Personal': return "bx bx-mobile me-1 ";
case 'Office': return "bx bx-phone me-1 ";
default: return "bx bx-phone me-1";
}
};
export const getBucketNameById = (buckets, id) => {
const bucket = buckets.find(b => b.id === id);
return bucket ? bucket.name : 'Unknown';
};