Skip to content

Commit e8dd39a

Browse files
committed
Homepage buttons (index.tsx) - change absolute links to relative
1 parent 9905772 commit e8dd39a

File tree

1 file changed

+32
-40
lines changed

1 file changed

+32
-40
lines changed

src/pages/index.tsx

Lines changed: 32 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import React, { useState } from 'react';
22
import Layout from '@theme/Layout';
3+
import Link from '@docusaurus/Link';
34
import { Box, Button, Container, Grid, Stack, Tab, Tabs, Typography } from '@mui/material';
45
import { TabContext, TabPanel } from '@mui/lab';
56
import bgImage from '../../static/img/hero-secondary-background.webp';
67
import heroImage from '../../static/img/hero-secondary-graphic.webp';
78
import SumoLogicDocsLogo from '../../static/img/sumo-logic-docs.svg';
89
import { Feature } from '../components/Feature';
910
import { features } from '../helper/features';
10-
import ErrorBoundary from '../components/ErrorBoundary'; // Import the ErrorBoundary component
11+
import ErrorBoundary from '../components/ErrorBoundary';
1112

1213
export const Home = () => {
1314
const [tab, setTab] = useState('0');
@@ -83,10 +84,7 @@ export const Home = () => {
8384
}}
8485
height='100%'
8586
>
86-
<Grid
87-
item
88-
md={6}
89-
>
87+
<Grid item md={6}>
9088
<Stack
9189
alignItems={{
9290
md: 'flex-start',
@@ -117,53 +115,47 @@ export const Home = () => {
117115
{
118116
children: '1. Set up collector and source',
119117
description: 'Set up a Sumo Logic collector and source',
120-
href: 'https://help.sumologic.com/docs/get-started/quickstart/#step-1-get-your-data-into-sumo',
118+
to: '/docs/get-started/quickstart#step-1-get-your-data-into-sumo',
121119
},
122120
{
123121
children: '2. Explore your data insights',
124122
description: 'Explore your insights',
125-
href: 'https://help.sumologic.com/docs/get-started/quickstart/#step-2-search-and-analyze-your-data',
123+
to: '/docs/get-started/quickstart#step-2-search-and-analyze-your-data',
126124
},
127125
{
128126
children: '3. Monitor and secure your environment',
129127
description: 'Monitor, troubleshoot, and secure your environment',
130-
href: 'https://help.sumologic.com/docs/get-started/quickstart/#step-3-monitor-and-troubleshoot-your-environment',
128+
to: '/docs/get-started/quickstart#step-3-monitor-and-troubleshoot-your-environment',
131129
},
132-
].map(({ children, ...rest }) => (
133-
<Button
134-
key={rest.href}
135-
sx={{
136-
bgcolor: 'transparent',
137-
border: '.5px solid',
138-
borderColor: '#e3e3e3',
139-
borderRadius: 2,
140-
fontFamily: 'Lab Grotesque',
141-
textTransform: 'none',
142-
width: {
143-
md: 'auto',
144-
xs: '100%',
145-
},
146-
'&:hover': {
147-
bgcolor: '#0045BE',
148-
borderColor: '#0045BE',
149-
color: '#e3e3e3',
150-
},
151-
}}
152-
variant='contained'
153-
{...rest}
154-
>
155-
{children}
156-
</Button>
130+
].map(({ children, to }) => (
131+
<Link key={to} to={to} style={{ textDecoration: 'none' }}>
132+
<Button
133+
sx={{
134+
bgcolor: 'transparent',
135+
border: '.5px solid',
136+
borderColor: '#e3e3e3',
137+
borderRadius: 2,
138+
fontFamily: 'Lab Grotesque',
139+
textTransform: 'none',
140+
width: {
141+
md: 'auto',
142+
xs: '100%',
143+
},
144+
'&:hover': {
145+
bgcolor: '#0045BE',
146+
borderColor: '#0045BE',
147+
color: '#e3e3e3',
148+
},
149+
}}
150+
variant='contained'
151+
>
152+
{children}
153+
</Button>
154+
</Link>
157155
))}
158156
</Stack>
159157
</Grid>
160-
<Grid
161-
item
162-
md={6}
163-
pl={{
164-
md: 13,
165-
}}
166-
>
158+
<Grid item md={6} pl={{ md: 13 }}>
167159
<Box
168160
component='img'
169161
alt='hero background image'

0 commit comments

Comments
 (0)