Adjust ReaderChapterTransition text color

Text color was never adjusted based on the selected "reader background color"
This commit is contained in:
schroda
2024-12-25 02:36:53 +01:00
parent 7d93b7995a
commit 5dbf1aa8e0
3 changed files with 48 additions and 12 deletions

View File

@@ -31,3 +31,9 @@ export const getErrorMessage = (error: unknown): string => {
return `${error}`;
};
export const getValueFromObject = <T>(obj: Record<string, any>, key: string): T => {
const keys = key.split('.');
return keys.reduce((acc, curr) => acc?.[curr], obj) as T;
};