mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-05-20 18:10:08 +02:00
26 lines
601 B
TypeScript
26 lines
601 B
TypeScript
import { ReactNode, VFC } from 'react';
|
|
|
|
import { Module, findModuleChild } from '../webpack';
|
|
|
|
export interface SidebarNavigationPages {
|
|
title: string;
|
|
route: string;
|
|
content: ReactNode;
|
|
}
|
|
|
|
export interface SidebarNavigationProps {
|
|
title?: string;
|
|
pages: SidebarNavigationPages[];
|
|
showTitle?: boolean;
|
|
disableRouteReporting?: boolean;
|
|
}
|
|
|
|
export const SidebarNavigation = findModuleChild((mod: Module) => {
|
|
for (let prop in mod) {
|
|
if (mod[prop]?.toString()?.includes('"disableRouteReporting"')) {
|
|
return mod[prop];
|
|
}
|
|
}
|
|
return null;
|
|
}) as VFC<SidebarNavigationProps>;
|