Skip to content

Commit 4d65ed1

Browse files
committed
[dashboard] prefetch components
1 parent cd4d4e1 commit 4d65ed1

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

components/dashboard/src/App.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,19 @@ import StartWorkspace from './start/StartWorkspace';
88
import { Login } from './Login';
99
import { UserContext } from './user-context';
1010
import { getGitpodService } from './service/service';
11+
import Header from './components/Header';
1112

12-
const Account = React.lazy(() => import('./settings/Account'));
13-
const Notifications = React.lazy(() => import('./settings/Notifications'));
14-
const Plans = React.lazy(() => import('./settings/Plans'));
15-
const EnvironmentVariables = React.lazy(() => import('./settings/EnvironmentVariables'));
16-
const GitIntegrations = React.lazy(() => import('./settings/GitIntegrations'));
17-
const Preferences = React.lazy(() => import('./settings/Preferences'));
13+
const Account = React.lazy(() => import(/* webpackPrefetch: true */ './settings/Account'));
14+
const Notifications = React.lazy(() => import(/* webpackPrefetch: true */ './settings/Notifications'));
15+
const Plans = React.lazy(() => import(/* webpackPrefetch: true */ './settings/Plans'));
16+
const EnvironmentVariables = React.lazy(() => import(/* webpackPrefetch: true */ './settings/EnvironmentVariables'));
17+
const GitIntegrations = React.lazy(() => import(/* webpackPrefetch: true */ './settings/GitIntegrations'));
18+
const Preferences = React.lazy(() => import(/* webpackPrefetch: true */ './settings/Preferences'));
1819

1920
function Loading() {
20-
return (<h3>Loading...</h3>);
21+
return <>
22+
<Header title="" subtitle="" />
23+
</>;
2124
}
2225

2326
function App() {
@@ -60,8 +63,6 @@ function App() {
6063
<div className="container">
6164
{user && renderMenu()}
6265

63-
{loading && (<Loading />)}
64-
6566
<Suspense fallback={<Loading />}>
6667
<Switch>
6768
{user && (

0 commit comments

Comments
 (0)