created separet util. fun file for directory components
This commit is contained in:
parent
c78f94b17f
commit
0cefb98ac1
26
src/components/Directory/DirectoryUtils.js
Normal file
26
src/components/Directory/DirectoryUtils.js
Normal 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';
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user