Skip to content

Commit ffe3b2f

Browse files
committed
Make feature types consistent
1 parent eb8911c commit ffe3b2f

File tree

1 file changed

+9
-23
lines changed

1 file changed

+9
-23
lines changed

src/components/sections/DevTools.tsx

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,9 @@ import network from '~/images/screenshots/view-network-requests.png'
1313
import { LandingPageFragment } from '~/lib/basehub-queries'
1414

1515
const images = {
16-
testSteps: {
17-
type: 'image',
18-
src: testSteps
19-
},
20-
console: {
21-
type: 'mux-video',
22-
src: '9ERwx5ymPqmmqMeRIhVqCvnhyy009017y00mtdvISQF6fI'
23-
},
24-
react: {
25-
type: 'image',
26-
src: react
27-
},
28-
network: {
29-
type: 'image',
30-
src: network
31-
}
16+
testSteps,
17+
react,
18+
network
3219
}
3320

3421
export function DevTools({ devTools }: LandingPageFragment) {
@@ -124,15 +111,15 @@ export function DevTools({ devTools }: LandingPageFragment) {
124111
{feature.type === 'image' ? (
125112
<Image
126113
className="w-full"
127-
src={featureImage.src}
114+
src={featureImage}
128115
alt=""
129116
priority
130117
sizes="(min-width: 1024px) 67.8125rem, (min-width: 640px) 100vw, 45rem"
131118
/>
132119
) : (
133120
<MuxPlayer
134121
streamType="on-demand"
135-
playbackId={featureImage.src as string}
122+
playbackId={feature.video as string}
136123
primaryColor="#FFFFFF"
137124
secondaryColor="#000000"
138125
muted={true}
@@ -181,19 +168,18 @@ export function DevTools({ devTools }: LandingPageFragment) {
181168
</div>
182169
</h3>
183170
<p className={clsx('mb-8 mt-2 text-sm')}>{feature.subTitle}</p>
184-
{featureImage.type === 'image' && (
171+
{feature.type === 'image' ? (
185172
<Image
186173
className="w-full"
187-
src={featureImage.src}
174+
src={featureImage}
188175
alt=""
189176
priority
190177
sizes="(min-width: 1024px) 67.8125rem, (min-width: 500px) 100vw, 30rem"
191178
/>
192-
)}
193-
{featureImage.type === 'mux-video' && (
179+
) : (
194180
<MuxPlayer
195181
streamType="on-demand"
196-
playbackId={featureImage.src as string}
182+
playbackId={feature.video as string}
197183
primaryColor="#FFFFFF"
198184
secondaryColor="#ff00ff"
199185
muted={true}

0 commit comments

Comments
 (0)