Skip to content

Commit

Permalink
feat(frontend): add resources in home page (#3678)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgeepc committed Feb 23, 2024
1 parent 78a2ecd commit 8f2f2dc
Show file tree
Hide file tree
Showing 13 changed files with 318 additions and 14 deletions.
47 changes: 47 additions & 0 deletions web/src/assets/group.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions web/src/assets/media.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions web/src/assets/pages.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions web/src/components/Resources/Content/Content.styled.ts
@@ -0,0 +1,39 @@
import {Typography} from 'antd';
import styled from 'styled-components';

export const Body = styled.div`
display: flex;
gap: 24px;
width: 100%;
`;

export const Container = styled.div`
padding: 0;
`;

export const Title = styled(Typography.Title)`
&& {
margin-bottom: 6px;
}
`;

export const Text = styled(Typography.Text)``;

export const Link = styled(Typography.Link)`
font-weight: bold;
`;

export const Card = styled.div`
background-color: ${({theme}) => theme.color.white};
border-radius: 2px;
display: flex;
flex: 1;
flex-direction: column;
gap: 14px;
padding: 24px;
`;

export const Icon = styled.img`
width: 64px;
height: auto;
`;
62 changes: 62 additions & 0 deletions web/src/components/Resources/Content/Content.tsx
@@ -0,0 +1,62 @@
import {ArrowRightOutlined} from '@ant-design/icons';
import pagesIcon from 'assets/pages.svg';
import groupIcon from 'assets/group.svg';
import mediaIcon from 'assets/media.svg';
import {COMMUNITY_SLACK_URL, DOCUMENTATION_URL} from 'constants/Common.constants';
import {useDashboard} from 'providers/Dashboard/Dashboard.provider';
import * as S from './Content.styled';

const Content = () => {
const {navigate} = useDashboard();

return (
<S.Container>
<S.Body>
<S.Card>
<S.Icon src={groupIcon} />
<div>
<S.Title>Tests</S.Title>
<S.Text>
Haven&apos;t created a test yet? Go to the &apos;Tests&apos; page to kickstart your testing adventure.
</S.Text>
<S.Link
onClick={e => {
e.preventDefault();
navigate(`/tests`);
}}
>
{' '}
Go to tests <ArrowRightOutlined />
</S.Link>
</div>
</S.Card>

<S.Card>
<S.Icon src={pagesIcon} />
<div>
<S.Title>Documentation</S.Title>
<S.Text>The ultimate technical resources and step-by-step guides that allows you to quickly start.</S.Text>
<S.Link target="_blank" href={DOCUMENTATION_URL}>
{' '}
View documentation <ArrowRightOutlined />
</S.Link>
</div>
</S.Card>

<S.Card>
<S.Icon src={mediaIcon} />
<div>
<S.Title>Community</S.Title>
<S.Text>Check the latest updates and support from the community.</S.Text>
<S.Link target="_blank" href={COMMUNITY_SLACK_URL}>
{' '}
Join our community <ArrowRightOutlined />
</S.Link>
</div>
</S.Card>
</S.Body>
</S.Container>
);
};

export default Content;
2 changes: 2 additions & 0 deletions web/src/components/Resources/Content/index.ts
@@ -0,0 +1,2 @@
// eslint-disable-next-line no-restricted-exports
export {default} from './Content';

0 comments on commit 8f2f2dc

Please sign in to comment.