Skip to content

Commit

Permalink
Merge pull request #817 from imobachgs/drop-disable-l10n
Browse files Browse the repository at this point in the history
Drop the unused "disableL10n" feature
  • Loading branch information
imobachgs authored Oct 25, 2023
2 parents 9c26603 + 6cc82dd commit 55010d7
Showing 1 changed file with 6 additions and 22 deletions.
28 changes: 6 additions & 22 deletions web/src/context/agama.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +27,21 @@ import { L10nProvider } from "./l10n";
import { SoftwareProvider } from "./software";
import { NotificationProvider } from "./notification";

const InternalProviders = ({ children }) => {
return (
<SoftwareProvider>
<NotificationProvider>
{children}
</NotificationProvider>
</SoftwareProvider>
);
};

/**
* Combines all application providers.
*
* @param {object} props
* @param {React.ReactNode} [props.children] - content to display within the provider.
* @param {boolean} [props.disableL10n] - Disable l10n handling (to be used
* during tests). FIXME: this argument might not be needed anymore.
*/
function AgamaProviders({ disableL10n, children }) {
if (disableL10n) {
return (
<InstallerClientProvider>
<InternalProviders>{children}</InternalProviders>
</InstallerClientProvider>
);
}

function AgamaProviders({ children }) {
return (
<InstallerClientProvider>
<L10nProvider>
<InternalProviders>{children}</InternalProviders>
<SoftwareProvider>
<NotificationProvider>
{children}
</NotificationProvider>
</SoftwareProvider>
</L10nProvider>
</InstallerClientProvider>
);
Expand Down

0 comments on commit 55010d7

Please sign in to comment.