index.tsx 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. import React from "react";
  2. import { useRouter } from "next/router";
  3. import { FaHeart, FaTwitter } from "react-icons/fa";
  4. import { Button } from "src/components/Button";
  5. import { Modal } from "src/components/Modal";
  6. import styled from "styled-components";
  7. const StyledTitle = styled.p`
  8. display: flex;
  9. align-items: center;
  10. color: ${({ theme }) => theme.TEXT_POSITIVE};
  11. flex: 1;
  12. font-weight: 700;
  13. font-family: "Catamaran", sans-serif;
  14. margin-top: 0;
  15. &::after {
  16. background: ${({ theme }) => theme.TEXT_POSITIVE};
  17. height: 1px;
  18. content: "";
  19. -webkit-box-flex: 1;
  20. -ms-flex: 1 1 auto;
  21. flex: 1 1 auto;
  22. margin-left: 4px;
  23. opacity: 0.6;
  24. }
  25. `;
  26. const ButtonsWrapper = styled.div`
  27. display: flex;
  28. padding: 40px 0 0;
  29. gap: 20px;
  30. `;
  31. export const GoalsModal = ({ visible, setVisible }) => {
  32. const { push } = useRouter();
  33. return (
  34. <Modal visible={visible} setVisible={setVisible}>
  35. <Modal.Header>Help JSON Crack&apos;s Goals</Modal.Header>
  36. <Modal.Content>
  37. <StyledTitle>OUR GOAL</StyledTitle>
  38. <b>JSON Crack&apos;s Goal</b> is to keep the service completely free and open
  39. source for everyone! For the contiunity of our service and keep the new
  40. updates coming we need your support to make that possible ❤️
  41. <ButtonsWrapper>
  42. <Button
  43. href="https://github.com/sponsors/AykutSarac"
  44. target="_blank"
  45. rel="me"
  46. status="DANGER"
  47. block
  48. link
  49. >
  50. <FaHeart />
  51. Sponsor
  52. </Button>
  53. <Button
  54. href={`https://twitter.com/intent/tweet?button=&url=${encodeURIComponent(
  55. "https://jsoncrack.com"
  56. )}&text=Looking+to+understand+or+explore+some+JSON?+Just+paste+or+upload+to+visualize+it+as+a+graph+with+JSON+Crack+😍&button=`}
  57. rel="noreferrer"
  58. status="SECONDARY"
  59. block
  60. link
  61. >
  62. <FaTwitter />
  63. Share on Twitter
  64. </Button>
  65. </ButtonsWrapper>
  66. </Modal.Content>
  67. <Modal.Controls setVisible={setVisible} />
  68. </Modal>
  69. );
  70. };