Skip to content

Commit

Permalink
Merge pull request #122 from dev-family/ADM-209
Browse files Browse the repository at this point in the history
ADM-209; (Feat) Add the ability to change the base path of the application (basename in react-router)
  • Loading branch information
arturvolokhin authored Aug 30, 2024
2 parents 83bf7fa + 2515c7f commit fb9cca9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion admiral/admin/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export type AdminProps = {
themePresets?: { light: ThemePreset; dark: ThemePreset }
locale?: Partial<CRUDLocale>
oauthProviders?: OAuthProvidersEnum[]
baseAppUrl?: string
}

export const Admin: React.FC<AdminProps> = ({
Expand All @@ -39,6 +40,7 @@ export const Admin: React.FC<AdminProps> = ({
locale,
children,
oauthProviders,
baseAppUrl = '',
}) => {
return (
<AuthContextProvider value={authProvider}>
Expand All @@ -54,7 +56,7 @@ export const Admin: React.FC<AdminProps> = ({
>
<LocaleContextProvider value={locale}>
<UserContextProvider>
<Router>
<Router basename={baseAppUrl}>
<ThemeProvider presets={themePresets}>
<NavProvider menu={menu}>{children}</NavProvider>
</ThemeProvider>
Expand Down
1 change: 1 addition & 0 deletions lib/admiral/admin/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ export declare type AdminProps = {
};
locale?: Partial<CRUDLocale>;
oauthProviders?: OAuthProvidersEnum[];
baseAppUrl?: string;
};
export declare const Admin: React.FC<AdminProps>;

0 comments on commit fb9cca9

Please sign in to comment.