diff --git a/_old/app/manifesto/page.tsx b/_old/app/manifesto/page.tsx index b6056b0..562b5a8 100644 --- a/_old/app/manifesto/page.tsx +++ b/_old/app/manifesto/page.tsx @@ -1,6 +1,5 @@ 'use client'; -import {aColor, supportEmail} from "@/lib/client/constants"; import Image from 'next/image'; export default function PrivacyPage() { diff --git a/_old/lib/client/constants.tsx b/_old/lib/client/constants.tsx index 9863487..7b65137 100644 --- a/_old/lib/client/constants.tsx +++ b/_old/lib/client/constants.tsx @@ -1,11 +1,2 @@ 'use client'; -export const supportEmail = 'compass.meet.marketing@gmail.com'; - -export const pStyle = "mt-1 text-gray-800 dark:text-white whitespace-pre-line"; - -export const aColor = ; \ No newline at end of file diff --git a/backend/email/emails/utils.tsx b/backend/email/emails/utils.tsx index 32bdd22..8f63253 100644 --- a/backend/email/emails/utils.tsx +++ b/backend/email/emails/utils.tsx @@ -1,4 +1,5 @@ import {Column, Img, Link, Row, Section, Text} from "@react-email/components"; +import {discordLink, githubRepo, patreonLink, paypalLink} from "common/constants"; interface Props { email?: string @@ -13,7 +14,7 @@ export const Footer = ({
- + - + - + - + { describe('x/twitter', () => { @@ -75,6 +76,6 @@ describe('getSocialUrl', () => { it('should handle discord user IDs and default invite', () => { expect(getSocialUrl('discord', '123456789012345678')).toBe('https://discord.com/users/123456789012345678') - expect(getSocialUrl('discord', 'not-an-id')).toBe('https://discord.gg/8Vd7jzqjun') + expect(getSocialUrl('discord', 'not-an-id')).toBe({discordLink}) }) }) \ No newline at end of file diff --git a/common/src/socials.ts b/common/src/socials.ts index 8af8d76..2380182 100644 --- a/common/src/socials.ts +++ b/common/src/socials.ts @@ -1,3 +1,5 @@ +import {discordLink} from "common/constants"; + export const SITE_ORDER = [ 'site', // personal site 'x', // twitter @@ -73,7 +75,7 @@ const urler: { [key in Site]: (handle: string) => string } = { discord: (s) => (s.length === 17 || s.length === 18) && !isNaN(parseInt(s, 10)) ? `https://discord.com/users/${s}` // discord user id - : 'https://discord.gg/8Vd7jzqjun', // our server + : discordLink, // our server bluesky: (s) => `https://bsky.app/profile/${s}`, mastodon: (s) => s.includes('@') ? `https://${s.split('@')[1]}/@${s.split('@')[0]}` : s, diff --git a/web/lib/util/constants.tsx b/web/lib/util/constants.tsx new file mode 100644 index 0000000..8a06815 --- /dev/null +++ b/web/lib/util/constants.tsx @@ -0,0 +1,5 @@ +export const aColor = ; \ No newline at end of file diff --git a/web/pages/404.tsx b/web/pages/404.tsx index 7c82b0e..62f005f 100644 --- a/web/pages/404.tsx +++ b/web/pages/404.tsx @@ -5,6 +5,7 @@ import { Col } from 'web/components/layout/col' import { Title } from 'web/components/widgets/title' import { ExternalLinkIcon } from '@heroicons/react/outline' +import {discordLink, formLink, githubIssues} from "common/constants"; export default function Custom404(props: { customText?: string }) { return ( @@ -27,7 +28,7 @@ export function Custom404Content(props: { customText?: string }) { target="_blank" rel="noopener noreferrer" className="items-center hover:text-indigo-400 hover:underline" - href="https://forms.gle/tKnXUMAbEreMK6FC6" + href={formLink} > a Google Form @@ -36,7 +37,7 @@ export function Custom404Content(props: { customText?: string }) { target="_blank" rel="noopener noreferrer" className="items-center hover:text-indigo-400 hover:underline" - href="https://discord.gg/8Vd7jzqjun" + href={discordLink} > Discord @@ -45,7 +46,7 @@ export function Custom404Content(props: { customText?: string }) { target="_blank" rel="noopener noreferrer" className="items-center hover:text-indigo-400 hover:underline" - href="https://github.com/CompassConnections/Compass/issues" + href={githubIssues} > GitHub! diff --git a/web/pages/about.tsx b/web/pages/about.tsx index 90235c6..8055aa5 100644 --- a/web/pages/about.tsx +++ b/web/pages/about.tsx @@ -1,6 +1,7 @@ import {LovePage} from 'web/components/love-page' import {ReactNode} from "react"; import Link from "next/link"; +import {discordLink, formLink, githubRepo} from "common/constants"; export const AboutBlock = (props: { @@ -79,7 +80,7 @@ export default function About() {

Give suggestions or let us know you want to help through this form!

@@ -90,7 +91,7 @@ export default function About() {
Join the Community

Shape the product or chat with like-minded people.

@@ -101,7 +102,7 @@ export default function About() {
Develop the App

The full source code and instructions are available on GitHub.

View Code diff --git a/web/pages/privacy.tsx b/web/pages/privacy.tsx index a54817a..2df0f58 100644 --- a/web/pages/privacy.tsx +++ b/web/pages/privacy.tsx @@ -1,5 +1,5 @@ -import {supportEmail} from "../../old/lib/client/constants"; import {LovePage} from "web/components/love-page"; +import {supportEmail} from "common/constants"; // TODO: convert to MarkDown for better readability during modifications? export default function PrivacyPage() { diff --git a/web/pages/terms.tsx b/web/pages/terms.tsx index 586355b..a96c54a 100644 --- a/web/pages/terms.tsx +++ b/web/pages/terms.tsx @@ -1,5 +1,5 @@ -import {supportEmail} from "../../old/lib/client/constants"; import {LovePage} from "web/components/love-page"; +import {supportEmail} from "common/constants"; // TODO: convert to MarkDown for better readability during modifications? export default function TermsPage() {