Skip to content

Commit 3b8167b

Browse files
committed
Reformat files with Prettier
1 parent ae6e492 commit 3b8167b

File tree

4 files changed

+102
-127
lines changed

4 files changed

+102
-127
lines changed

src/app/Pages/Dashboard/Home.tsx

Lines changed: 38 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,62 @@
1-
import * as React from 'react'
2-
import {
3-
PageSectionVariants,
4-
PageSection,
5-
Title,
6-
Flex,
7-
FlexItem
8-
} from '@patternfly/react-core'
9-
import {Helmet} from 'react-helmet'
10-
import {
11-
useDocumentTitle
12-
} from '@app/utils/useDocumentTitle'
13-
import Footer from '@app/components/Footer'
14-
import logo from '@app/bgimages/ohc-hero.png'
15-
import {ImageTable} from '@app/components/ImageTable'
16-
import {ExternalLinksCard} from "@app/components/ExternalLinksCard";
17-
import {InternalLinksCard} from "@app/components/InternalLinkCard";
1+
import * as React from 'react';
2+
import { PageSectionVariants, PageSection, Title, Flex, FlexItem } from '@patternfly/react-core';
3+
import { Helmet } from 'react-helmet';
4+
import { useDocumentTitle } from '@app/utils/useDocumentTitle';
5+
import Footer from '@app/components/Footer';
6+
import logo from '@app/bgimages/ohc-hero.png';
7+
import { ImageTable } from '@app/components/ImageTable';
8+
import { ExternalLinksCard } from '@app/components/ExternalLinksCard';
9+
import { InternalLinksCard } from '@app/components/InternalLinkCard';
1810

19-
const Home: React.FunctionComponent<{ title: string }> = ({title}) => {
20-
21-
useDocumentTitle(title)
11+
const Home: React.FunctionComponent<{ title: string }> = ({ title }) => {
12+
useDocumentTitle(title);
2213
return (
2314
<div>
2415
<Helmet>
2516
<meta
2617
name="description"
2718
content="The Cloud Image Directory is a tool that makes finding and running
2819
Red Hat Enterprise Linux (RHEL) cloud images on AWS, Azure and Google Cloud
29-
platforms easy."/>
30-
<link rel="canonical" href="https://imagedirectory.cloud/"/>
20+
platforms easy."
21+
/>
22+
<link rel="canonical" href="https://imagedirectory.cloud/" />
3123
</Helmet>
32-
<PageSection className='hero-section'>
33-
<Flex className='hero-text' alignItems={{
34-
default: 'alignItemsCenter'
35-
}}>
24+
<PageSection className="hero-section">
25+
<Flex
26+
className="hero-text"
27+
alignItems={{
28+
default: 'alignItemsCenter',
29+
}}
30+
>
3631
<FlexItem>
37-
<Title headingLevel='h1' size='3xl'>
32+
<Title headingLevel="h1" size="3xl">
3833
Welcome to Cloud Image Directory
3934
</Title>
40-
<Title headingLevel='h1' size='lg'>
35+
<Title headingLevel="h1" size="lg">
4136
Get the images you need to start developing your Linux on-cloud experience.
4237
</Title>
4338
</FlexItem>
44-
<FlexItem
45-
spacer={{default: 'spacer2xl'}}
46-
align={{default: 'alignRight'}}>
47-
<img alt={'Red Hat Enterprise Linux for the Open Hybrid Cloud'} src={logo}
48-
style={{height: 200}}/>
39+
<FlexItem spacer={{ default: 'spacer2xl' }} align={{ default: 'alignRight' }}>
40+
<img alt={'Red Hat Enterprise Linux for the Open Hybrid Cloud'} src={logo} style={{ height: 200 }} />
4941
</FlexItem>
5042
</Flex>
5143
</PageSection>
5244
<PageSection variant={PageSectionVariants.light}>
53-
<Flex alignContent={ {default: "alignContentStretch" }} grow={{ default: 'grow' }} display={{ default: 'inlineFlex' }}>
54-
<InternalLinksCard/>
55-
<ExternalLinksCard/>
56-
</Flex>
45+
<Flex
46+
alignContent={{ default: 'alignContentStretch' }}
47+
grow={{ default: 'grow' }}
48+
display={{ default: 'inlineFlex' }}
49+
>
50+
<InternalLinksCard />
51+
<ExternalLinksCard />
52+
</Flex>
5753
</PageSection>
5854
<PageSection variant={PageSectionVariants.light}>
59-
<ImageTable/>
55+
<ImageTable />
6056
</PageSection>
61-
<Footer/>
57+
<Footer />
6258
</div>
63-
)
64-
}
59+
);
60+
};
6561

66-
export {Home}
62+
export { Home };
Lines changed: 42 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,48 @@
11
import React from 'react';
2-
import {
3-
Title,
4-
Bullseye,
5-
Split,
6-
Flex,
7-
FlexItem,
8-
Card,
9-
CardHeader,
10-
CardBody,
11-
CardFooter,
12-
Button,
13-
Grid,
14-
GridItem,
15-
CardTitle
16-
} from '@patternfly/react-core'
17-
18-
19-
import redhat_logo from "@app/bgimages/redhat_clear.png";
20-
import aws_logo from "@app/bgimages/aws_clear.png";
21-
import azure_logo from "@app/bgimages/azure_clear.png";
22-
import google_logo from "@app/bgimages/google_clear.png";
2+
import { Title, Bullseye, Flex, FlexItem, Button } from '@patternfly/react-core';
233

4+
import redhat_logo from '@app/bgimages/redhat_clear.png';
5+
import aws_logo from '@app/bgimages/aws_clear.png';
6+
import azure_logo from '@app/bgimages/azure_clear.png';
7+
import google_logo from '@app/bgimages/google_clear.png';
248

259
const providerInfos = [
2610
{
2711
name: 'aws',
2812
text: 'Launch in AWS ->',
29-
url: 'https://aws.amazon.com/marketplace/pp/prodview-kv5mi3ksb2mma?sr=0-1&ref_=beagle&applicationId=AWSMPContessa'
13+
url: 'https://aws.amazon.com/marketplace/pp/prodview-kv5mi3ksb2mma?sr=0-1&ref_=beagle&applicationId=AWSMPContessa',
3014
},
3115
{
3216
name: 'google',
3317
text: 'Launch in Google Cloud ->',
34-
url: 'https://console.cloud.google.com/marketplace/product/rhel-cloud/rhel-9?project=cockpituous'
18+
url: 'https://console.cloud.google.com/marketplace/product/rhel-cloud/rhel-9?project=cockpituous',
3519
},
3620
{
3721
name: 'azure',
3822
text: 'Launch in Azure ->',
39-
url: 'https://azuremarketplace.microsoft.com/en-us/marketplace/apps/redhat.rhel-20190605?tab=Overview'
40-
}
41-
]
23+
url: 'https://azuremarketplace.microsoft.com/en-us/marketplace/apps/redhat.rhel-20190605?tab=Overview',
24+
},
25+
];
4226

4327
const loadImage = (name) => {
4428
switch (name) {
4529
case 'aws':
46-
return aws_logo
30+
return aws_logo;
4731
case 'azure':
48-
return azure_logo
32+
return azure_logo;
4933
case 'google':
50-
return google_logo
34+
return google_logo;
5135
}
52-
}
36+
};
5337

5438
const ExternalLinksCard: React.FunctionComponent = () => {
5539
return (
56-
<Flex direction={{default: 'column'}} flex={{default: 'flex_3'}}
57-
justifyContent={{default: 'justifyContentSpaceBetween'}}
58-
style={{border: '1px solid #D2D2D2', padding: '2%'}}>
40+
<Flex
41+
direction={{ default: 'column' }}
42+
flex={{ default: 'flex_3' }}
43+
justifyContent={{ default: 'justifyContentSpaceBetween' }}
44+
style={{ border: '1px solid #D2D2D2', padding: '2%' }}
45+
>
5946
<FlexItem>
6047
<img
6148
src={redhat_logo}
@@ -64,34 +51,30 @@ const ExternalLinksCard: React.FunctionComponent = () => {
6451
width: '2vw',
6552
}}
6653
/>
67-
<br/>
68-
<Title headingLevel='h1'>Get the latest Red Hat Enterprise Linux certified image
69-
for cloud deployment</Title>
70-
<br/>
71-
<p>Launch the latest RHEL certified cloud image through available cloud service
72-
provider marketplaces.</p>
54+
<br />
55+
<Title headingLevel="h1">Get the latest Red Hat Enterprise Linux certified image for cloud deployment</Title>
56+
<br />
57+
<p>Launch the latest RHEL certified cloud image through available cloud service provider marketplaces.</p>
7358
</FlexItem>
7459
<Flex>
75-
{
76-
providerInfos.map(({name, text, url}, index) => (
77-
78-
<>
79-
<FlexItem key={`provider_card_${name}`}
80-
style={{borderRight: index != providerInfos.length - 1 ? '1px solid #979797' : 'null'}}>
81-
<img style={{height: 200, width: 200}} src={loadImage(name)}/>
82-
<Bullseye>
83-
<Button component="a" href={url} target="_blank" rel="noreferrer"
84-
variant="link">
85-
{text}
86-
</Button>
87-
</Bullseye>
88-
</FlexItem>
89-
</>
90-
))
91-
}
60+
{providerInfos.map(({ name, text, url }, index) => (
61+
<>
62+
<FlexItem
63+
key={`provider_card_${name}`}
64+
style={{ borderRight: index != providerInfos.length - 1 ? '1px solid #979797' : 'null' }}
65+
>
66+
<img style={{ height: 200, width: 200 }} src={loadImage(name)} />
67+
<Bullseye>
68+
<Button component="a" href={url} target="_blank" rel="noreferrer" variant="link">
69+
{text}
70+
</Button>
71+
</Bullseye>
72+
</FlexItem>
73+
</>
74+
))}
9275
</Flex>
9376
</Flex>
94-
)
95-
}
77+
);
78+
};
9679

97-
export {ExternalLinksCard}
80+
export { ExternalLinksCard };
Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
11
import React from 'react';
2-
import {
3-
Bullseye, Button, Card, CardBody, CardFooter, CardHeader, CardTitle,
4-
Flex, FlexItem, Title
5-
} from '@patternfly/react-core'
6-
7-
8-
import redhat_logo from '@app/bgimages/redhat_clear.png'
2+
import { Button, Flex, FlexItem, Title } from '@patternfly/react-core';
93

4+
import redhat_logo from '@app/bgimages/redhat_clear.png';
105

116
const providerInfo = {
127
name: 'redhat',
138
title: 'Build your own RHEL cloud image',
14-
description: "With Red Hat's image builder, you can create customizable and repeatable operating system images and server images",
9+
description:
10+
"With Red Hat's image builder, you can create customizable and repeatable operating system images and server images",
1511
text: 'Build an image ->',
16-
url: 'https://console.redhat.com/insights/image-builder'
17-
}
12+
url: 'https://console.redhat.com/insights/image-builder',
13+
};
1814

1915
const InternalLinksCard: React.FunctionComponent = () => {
2016
return (
21-
<Flex direction={{default: 'column'}} flex={{default: 'flex_1'}}
22-
justifyContent={{default: 'justifyContentSpaceBetween'}}
23-
alignSelf={{default: "alignSelfStretch"}}
24-
style={{border: '1px solid #D2D2D2', padding: '2%'}}>
17+
<Flex
18+
direction={{ default: 'column' }}
19+
flex={{ default: 'flex_1' }}
20+
justifyContent={{ default: 'justifyContentSpaceBetween' }}
21+
alignSelf={{ default: 'alignSelfStretch' }}
22+
style={{ border: '1px solid #D2D2D2', padding: '2%' }}
23+
>
2524
<FlexItem>
2625
<img
2726
src={redhat_logo}
@@ -30,21 +29,18 @@ const InternalLinksCard: React.FunctionComponent = () => {
3029
width: '2vw',
3130
}}
3231
/>
33-
<br/>
34-
<Title headingLevel='h1'>{providerInfo.title}</Title>
35-
<br/>
32+
<br />
33+
<Title headingLevel="h1">{providerInfo.title}</Title>
34+
<br />
3635
<p>{providerInfo.description}</p>
3736
</FlexItem>
38-
<FlexItem key={`provider_card_${providerInfo.name}`}>
39-
&nbsp;
40-
</FlexItem>
4137
<FlexItem>
42-
<Button component="a" href={providerInfo.url} target="_blank" rel="noreferrer"
43-
variant="link">{providerInfo.text}</Button>
38+
<Button component="a" href={providerInfo.url} target="_blank" rel="noreferrer" variant="link">
39+
{providerInfo.text}
40+
</Button>
4441
</FlexItem>
4542
</Flex>
43+
);
44+
};
4645

47-
)
48-
}
49-
50-
export {InternalLinksCard}
46+
export { InternalLinksCard };

src/app/components/LinkCardHeader.ts

Whitespace-only changes.

0 commit comments

Comments
 (0)