resources.tsx 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. import {useEffect} from 'react';
  2. import styled from '@emotion/styled';
  3. import breadcrumbsImg from 'sentry-images/spot/breadcrumbs-generic.svg';
  4. import docsImg from 'sentry-images/spot/code-arguments-tags-mirrored.svg';
  5. import releasesImg from 'sentry-images/spot/releases.svg';
  6. import PageHeading from 'sentry/components/pageHeading';
  7. import ResourceCard from 'sentry/components/resourceCard';
  8. import {t} from 'sentry/locale';
  9. import space from 'sentry/styles/space';
  10. import {Organization} from 'sentry/types';
  11. import {trackAnalyticsEvent} from 'sentry/utils/analytics';
  12. type Props = {
  13. organization: Organization;
  14. };
  15. function Resources({organization}: Props) {
  16. useEffect(() => {
  17. trackAnalyticsEvent({
  18. eventKey: 'orgdash.resources_shown',
  19. eventName: 'Projects Dashboard: Resources Shown',
  20. organization_id: organization.id,
  21. });
  22. });
  23. return (
  24. <ResourcesWrapper data-test-id="resources">
  25. <PageHeading withMargins>{t('Resources')}</PageHeading>
  26. <ResourceCards>
  27. <ResourceCard
  28. link="https://docs.sentry.io/product/releases/"
  29. imgUrl={releasesImg}
  30. title={t('The Sentry Workflow')}
  31. />
  32. <ResourceCard
  33. link="https://docs.sentry.io/product/issues/"
  34. imgUrl={breadcrumbsImg}
  35. title={t('Sentry vs Logging')}
  36. />
  37. <ResourceCard link="https://docs.sentry.io/" imgUrl={docsImg} title={t('Docs')} />
  38. </ResourceCards>
  39. </ResourcesWrapper>
  40. );
  41. }
  42. export default Resources;
  43. const ResourcesWrapper = styled('div')`
  44. border-top: 1px solid ${p => p.theme.border};
  45. padding: 25px 30px 10px 30px;
  46. `;
  47. const ResourceCards = styled('div')`
  48. display: grid;
  49. grid-template-columns: minmax(100px, 1fr);
  50. gap: ${space(3)};
  51. @media (min-width: ${p => p.theme.breakpoints.medium}) {
  52. grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  53. }
  54. `;