mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
refactor: environment setup (#2898)
Co-authored-by: Simon He <57086651+Simon-He95@users.noreply.github.com>
This commit is contained in:
@@ -5,7 +5,6 @@ import '../bootstrap';
|
||||
|
||||
import { AffineContext } from '@affine/component/context';
|
||||
import { WorkspaceFallback } from '@affine/component/workspace';
|
||||
import { config } from '@affine/env';
|
||||
import { createI18n, I18nextProvider } from '@affine/i18n';
|
||||
import type { EmotionCache } from '@emotion/cache';
|
||||
import { CacheProvider } from '@emotion/react';
|
||||
@@ -42,9 +41,6 @@ const DebugProvider = ({ children }: PropsWithChildren): ReactElement => {
|
||||
};
|
||||
|
||||
const i18n = createI18n();
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
console.log('Runtime Preset', config);
|
||||
}
|
||||
|
||||
const App = function App({
|
||||
Component,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { MainContainer } from '@affine/component/workspace';
|
||||
import { config } from '@affine/env';
|
||||
import { NoSsr } from '@mui/material';
|
||||
import { affinePluginsAtom } from '@toeverything/plugin-infra/manager';
|
||||
import { useAtomValue } from 'jotai';
|
||||
@@ -29,7 +28,7 @@ const Plugins = () => {
|
||||
};
|
||||
|
||||
export default function PluginPage(): ReactElement {
|
||||
if (!config.enablePlugin) {
|
||||
if (!runtimeConfig.enablePlugin) {
|
||||
return <></>;
|
||||
}
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user