feat: custom org brand color (#474)

* feat: add package

* feat: add a new color picker

* feat: integrate with supabase

* feat: add translation

* run translation script

* feat: hover state

* quick fix

* fix: requested PR fixes

* update lock

* ux improvements

* remove log

* cleanup and improve code

---------

Co-authored-by: Rotimi Best <[email protected]>
This commit is contained in:
Adeyemi Adetunji
2024-10-06 01:20:32 +01:00
committed by GitHub
co-authored by Rotimi Best
parent 1ee02cdf3a
commit 947181a3c5
19 changed files with 292 additions and 80 deletions
@@ -0,0 +1,14 @@
export function tc<T>(tryFunc: () => T, catchFunc: T | ((e?: Error) => T)) {
let val: T;
try {
val = tryFunc();
} catch (e: unknown) {
if (typeof catchFunc === 'function') {
// @ts-ignore
val = catchFunc(e);
} else {
val = catchFunc;
}
}
return val;
}