feat: add dynamic breadcrumb (#706)
* feat: add dynamic breadcrumb * feat: pr feedback
This commit is contained in:
@@ -11,3 +11,11 @@ export const languageMapping = () => {
|
||||
|
||||
return mapping as Record<(typeof supportedLanguages)[number], () => ReturnType<typeof enTranslations>>;
|
||||
};
|
||||
|
||||
type NestedKeyOf<ObjectType extends object> = {
|
||||
[Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object
|
||||
? `${Key}` | `${Key}.${NestedKeyOf<ObjectType[Key]>}`
|
||||
: `${Key}`;
|
||||
}[keyof ObjectType & (string | number)];
|
||||
|
||||
export type TranslationKeys = NestedKeyOf<typeof enTranslations>;
|
||||
|
||||
Reference in New Issue
Block a user