Footer.tsx 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. import React, { FC, useEffect } from "react";
  2. import getConfig from "next/config";
  3. import showRecaptcha from "../helpers/recaptcha";
  4. import { useStoreState } from "../store";
  5. import { ColCenter } from "./Layout";
  6. import ReCaptcha from "./ReCaptcha";
  7. import ALink from "./ALink";
  8. import Text from "./Text";
  9. const { publicRuntimeConfig } = getConfig();
  10. const Footer: FC = () => {
  11. const { isAuthenticated } = useStoreState((s) => s.auth);
  12. useEffect(() => {
  13. showRecaptcha();
  14. }, []);
  15. return (
  16. <ColCenter
  17. as="footer"
  18. width={1}
  19. backgroundColor="white"
  20. p={isAuthenticated ? 2 : 24}
  21. >
  22. {!isAuthenticated && <ReCaptcha />}
  23. <Text fontSize={[12, 13]} py={2}>
  24. Made with love by{" "}
  25. <ALink href="//thedevs.network/" title="The Devs" target="_blank">
  26. The Devs
  27. </ALink>
  28. .{" | "}
  29. <ALink
  30. href="https://github.com/thedevs-network/kutt"
  31. title="GitHub"
  32. target="_blank"
  33. >
  34. GitHub
  35. </ALink>
  36. {" | "}
  37. <ALink href="/terms" title="Terms of Service" isNextLink>
  38. Terms of Service
  39. </ALink>
  40. {" | "}
  41. <ALink href="/report" title="Report abuse" isNextLink>
  42. Report Abuse
  43. </ALink>
  44. {publicRuntimeConfig.CONTACT_EMAIL && (
  45. <>
  46. {" | "}
  47. <ALink
  48. href={`mailto:${publicRuntimeConfig.CONTACT_EMAIL}`}
  49. title="Contact us"
  50. >
  51. Contact us
  52. </ALink>
  53. </>
  54. )}
  55. .
  56. </Text>
  57. </ColCenter>
  58. );
  59. };
  60. export default Footer;