update home documentation code examples

Signed-off-by: Emma Indal <emma.indahl@gmail.com>
This commit is contained in:
Emma Indal
2023-05-26 10:09:53 +02:00
parent 7dd8b39a92
commit 82cc463ced
2 changed files with 30 additions and 38 deletions
+9 -11
View File
@@ -40,10 +40,10 @@ Inside your `packages/app` directory, create a new file where our new homepage c
```tsx
import React from 'react';
export const HomePage = () => {
export const homePage = (
/* We will shortly compose a pretty homepage here. */
return <h1>Welcome to Backstage!</h1>;
};
<h1>Welcome to Backstage!</h1>
);
```
#### 3. Update router for the root `/` route
@@ -161,13 +161,11 @@ import React from 'react';
import Grid from '@material-ui/core/Grid';
import { HomePageCompanyLogo } from '@backstage/plugin-home';
export const HomePage = () => {
return (
<Grid container spacing={3}>
<Grid item xs={12} md={4}>
<HomePageCompanyLogo />
</Grid>
export const homePage = (
<Grid container spacing={3}>
<Grid item xs={12} md={4}>
<HomePageCompanyLogo />
</Grid>
);
};
</Grid>
);
```