diff --git a/src/frontend/pages/HomePage/home.module.css b/src/frontend/pages/HomePage/home.module.css index c8deba6a..f63ebc65 100644 --- a/src/frontend/pages/HomePage/home.module.css +++ b/src/frontend/pages/HomePage/home.module.css @@ -5,5 +5,5 @@ .title { text-align: center; - padding-top: 2em; + padding-top: 1em; } diff --git a/src/frontend/pages/HomePage/useful-links/useful-links.test.tsx b/src/frontend/pages/HomePage/useful-links/useful-links.test.tsx index 0a20c5b5..fb17a93c 100644 --- a/src/frontend/pages/HomePage/useful-links/useful-links.test.tsx +++ b/src/frontend/pages/HomePage/useful-links/useful-links.test.tsx @@ -17,14 +17,12 @@ describe('useful links component', () => { it('renders headers', () => { renderComponent(); expect(screen.getByText(/Useful Links/i)).toBeInTheDocument(); - expect(screen.getByText(/Finance/i)).toBeInTheDocument(); - expect(screen.getByText(/Other/i)).toBeInTheDocument(); }); it('renders links', () => { renderComponent(); - expect(screen.getByText(/Personal purchasing guidelines/i)).toBeInTheDocument(); - expect(screen.getByText(/Procurement form/i)).toBeInTheDocument(); - expect(screen.getByText(/Part numbering spreadsheet/i)).toBeInTheDocument(); + expect(screen.getByText(/Purchasing Guidelines/i)).toBeInTheDocument(); + expect(screen.getByText(/Procurement Form/i)).toBeInTheDocument(); + expect(screen.getAllByText(/Guidelines/i).length).toEqual(4); }); }); diff --git a/src/frontend/pages/HomePage/useful-links/useful-links.tsx b/src/frontend/pages/HomePage/useful-links/useful-links.tsx index 6d660596..561658bb 100644 --- a/src/frontend/pages/HomePage/useful-links/useful-links.tsx +++ b/src/frontend/pages/HomePage/useful-links/useful-links.tsx @@ -4,61 +4,68 @@ * */ -import { linkPipe } from '../../../../shared/pipes'; -import PageBlock from '../../../layouts/page-block/page-block'; +import { + faCoins, + faReceipt, + faHandHoldingUsd, + faDollarSign, + faFileAlt, + faSortNumericDown, + faCogs +} from '@fortawesome/free-solid-svg-icons'; import { Col, Container, Row } from 'react-bootstrap'; -import styles from './useful-links.module.css'; +import { iconLinkPipe } from '../../../../shared/pipes'; +import PageBlock from '../../../layouts/page-block/page-block'; +import './useful-links.module.css'; -// React-bootstrap grid documentation: https://react-bootstrap.github.io/layout/grid/ const UsefulLinks: React.FC = () => { - const financeLinks = [ - linkPipe( - 'Personal purchasing guidelines', + const links = [ + iconLinkPipe( + faCoins, + 'Purchasing Guidelines', 'https://docs.google.com/document/d/1M5Ldy9L1BifBo18tdKpv3CH-frRneyEK26hUXbtMg7Q/edit' ), - linkPipe('Procurement Form', 'https://forms.gle/6ztRoa1iL7p1KHwP6'), - linkPipe( - 'Reimbursement guidelines', + iconLinkPipe( + faHandHoldingUsd, + 'Reimbursement Guidelines', 'https://docs.google.com/document/d/1HvLnVNzZTftgoAXppIEp-gTmUBQGt-V6n97prziWWrs/edit' - ) - ]; - - const otherLinks = [ - linkPipe( - 'Part numbering spreadsheet', - 'https://docs.google.com/spreadsheets/d/1av0ReONZF3r82kCvkUEGl3uue4jfQgbw-KQDZnsejPQ/edit' ), - linkPipe( - 'McMaster order sheet', + iconLinkPipe(faDollarSign, 'Procurement Form', 'https://forms.gle/6ztRoa1iL7p1KHwP6'), + iconLinkPipe( + faReceipt, + 'McMaster Order Sheet', 'https://docs.google.com/spreadsheets/d/1kqpnw8jZDx2GO5NFUtqefRXqT1XX46iMx5ZI4euPJgY/edit' ), - linkPipe('Individual Member Goals Form', 'https://forms.gle/MAZJSFcMBjn44p3F6'), - linkPipe('Manufacturing Request Form', 'https://forms.gle/vJmTRt2xnzGa7akb8') + iconLinkPipe( + faFileAlt, + 'Project Update Log', + 'https://docs.google.com/document/d/1w0B6upZRY28MlbVA4hyU3X_NRNP0cagmLWqjHn6B8OA/edit' + ), + iconLinkPipe( + faSortNumericDown, + 'Part Numbering Guidelines', + 'https://docs.google.com/document/d/1Y8IXCvYjXP3RBj6h4-xLCHXVLW5R6pi3-4i5SYMKtZY/edit' + ), + iconLinkPipe( + faCogs, + 'Hardware Guidelines', + 'https://docs.google.com/document/d/1OD1d1VaIEHCwiFCuU7wfwAPu-UA--0_QzbyJjBsexwg/edit' + ) ]; + const allColsStyle = 'mb-2'; return ( } body={ - + - -

Finance

-
    - {financeLinks.map((link, idx) => ( -
  • {link}
  • - ))} -
- - -

Other

-
    - {otherLinks.map((link, idx) => ( -
  • {link}
  • - ))} -
- + {links.map((link) => ( + + {link} + + ))}
} diff --git a/src/shared/pipes.tsx b/src/shared/pipes.tsx index eb3917b5..0eababcd 100644 --- a/src/shared/pipes.tsx +++ b/src/shared/pipes.tsx @@ -28,7 +28,7 @@ export const linkPipe = (description: string, link: string): ReactElement => { export const iconLinkPipe = (icon: IconProp, description: string, link: string) => { return (
- + {linkPipe(description, link)}
);