diff --git a/web/components/markdown.tsx b/web/components/markdown.tsx index 692b29e3..024717f6 100644 --- a/web/components/markdown.tsx +++ b/web/components/markdown.tsx @@ -3,6 +3,8 @@ import {Col} from "web/components/layout/col"; import ReactMarkdown from "react-markdown"; import React from "react"; import Link from "next/link"; +import {SEO} from "web/components/SEO"; +import {capitalize} from "lodash"; type Props = { content: string; @@ -26,8 +28,14 @@ const MarkdownLink = ({href, children}: { href?: string; children: React.ReactNo } export default function MarkdownPage({content, filename}: Props) { + const title = /[A-Z]/.test(filename) ? filename : capitalize(filename) return ( + + ) diff --git a/web/pages/about.tsx b/web/pages/about.tsx index b5e5bb12..c4f67796 100644 --- a/web/pages/about.tsx +++ b/web/pages/about.tsx @@ -1,7 +1,8 @@ import {PageBase} from 'web/components/page-base' -import {ReactNode} from "react"; +import React, {ReactNode} from "react"; import Link from "next/link"; import {discordLink, formLink, githubRepo} from "common/constants"; +import {SEO} from "web/components/SEO"; export const AboutBlock = (props: { @@ -18,6 +19,11 @@ export const AboutBlock = (props: { export default function About() { return ( +
diff --git a/web/pages/confirm-email/[tokenId].tsx b/web/pages/confirm-email/[tokenId].tsx index ca261f6f..fa38f8f2 100644 --- a/web/pages/confirm-email/[tokenId].tsx +++ b/web/pages/confirm-email/[tokenId].tsx @@ -1,9 +1,16 @@ import {PageBase} from 'web/components/page-base' import {Col} from 'web/components/layout/col' +import {SEO} from "web/components/SEO"; +import React from "react"; export default function ConfirmEmail() { return ( +
Thank you for confirming your email! diff --git a/web/pages/constitution.tsx b/web/pages/constitution.tsx index 5365aa16..7447d1a8 100644 --- a/web/pages/constitution.tsx +++ b/web/pages/constitution.tsx @@ -8,12 +8,12 @@ const FILENAME = __filename.split('/').pop()?.split('.').shift(); export async function getStaticProps() { const filePath = path.join(process.cwd(), 'public', 'md', FILENAME + '.md'); const content = fs.readFileSync(filePath, 'utf8'); - return {props: {content}}; + return {props: {content, filename: FILENAME}}; } -type Props = { content: string }; +type Props = { content: string, filename: string }; -export default function Faq({content}: Props) { - if (!FILENAME) throw new Error('Could not determine filename'); - return +export default function Page({content, filename}: Props) { + if (!filename) throw new Error('Could not determine filename'); + return } diff --git a/web/pages/contact.tsx b/web/pages/contact.tsx index 81b02605..24673969 100644 --- a/web/pages/contact.tsx +++ b/web/pages/contact.tsx @@ -6,7 +6,7 @@ import {ContactComponent} from "web/components/contact"; export default function ContactPage() { return ( -} +export default function Page({content, filename}: Props) { + if (!filename) throw new Error('Could not determine filename'); + return +} \ No newline at end of file diff --git a/web/pages/financials.tsx b/web/pages/financials.tsx index 5365aa16..7447d1a8 100644 --- a/web/pages/financials.tsx +++ b/web/pages/financials.tsx @@ -8,12 +8,12 @@ const FILENAME = __filename.split('/').pop()?.split('.').shift(); export async function getStaticProps() { const filePath = path.join(process.cwd(), 'public', 'md', FILENAME + '.md'); const content = fs.readFileSync(filePath, 'utf8'); - return {props: {content}}; + return {props: {content, filename: FILENAME}}; } -type Props = { content: string }; +type Props = { content: string, filename: string }; -export default function Faq({content}: Props) { - if (!FILENAME) throw new Error('Could not determine filename'); - return +export default function Page({content, filename}: Props) { + if (!filename) throw new Error('Could not determine filename'); + return } diff --git a/web/pages/help.tsx b/web/pages/help.tsx index a362807b..97780f5a 100644 --- a/web/pages/help.tsx +++ b/web/pages/help.tsx @@ -3,10 +3,16 @@ import {SEO} from 'web/components/SEO' import Link from 'next/link' import {Col} from 'web/components/layout/col' import {Row} from 'web/components/layout/row' +import React from "react"; export default function HelpPage() { return ( +

Help & Support

diff --git a/web/pages/index.tsx b/web/pages/index.tsx index 7c6a0129..9fa8d117 100644 --- a/web/pages/index.tsx +++ b/web/pages/index.tsx @@ -3,6 +3,7 @@ import {Col} from 'web/components/layout/col' import {useUser} from 'web/hooks/use-user' import {LoggedOutHome} from "web/components/home/home"; import {ProfilesHome} from "web/components/profiles/profiles-home"; +import React from "react"; export default function ProfilesPage() { diff --git a/web/pages/members.tsx b/web/pages/members.tsx index 5365aa16..7447d1a8 100644 --- a/web/pages/members.tsx +++ b/web/pages/members.tsx @@ -8,12 +8,12 @@ const FILENAME = __filename.split('/').pop()?.split('.').shift(); export async function getStaticProps() { const filePath = path.join(process.cwd(), 'public', 'md', FILENAME + '.md'); const content = fs.readFileSync(filePath, 'utf8'); - return {props: {content}}; + return {props: {content, filename: FILENAME}}; } -type Props = { content: string }; +type Props = { content: string, filename: string }; -export default function Faq({content}: Props) { - if (!FILENAME) throw new Error('Could not determine filename'); - return +export default function Page({content, filename}: Props) { + if (!filename) throw new Error('Could not determine filename'); + return } diff --git a/web/pages/messages/[channelId].tsx b/web/pages/messages/[channelId].tsx index 9c63f3eb..9c329622 100644 --- a/web/pages/messages/[channelId].tsx +++ b/web/pages/messages/[channelId].tsx @@ -3,7 +3,7 @@ import {useRouter} from 'next/router' import {usePrivateMessages, useSortedPrivateMessageMemberships,} from 'web/hooks/use-private-messages' import {Col} from 'web/components/layout/col' import {User} from 'common/user' -import {useEffect, useState} from 'react' +import React, {useEffect, useState} from 'react' import {track} from 'web/lib/service/analytics' import {firebaseLogin} from 'web/lib/firebase/users' import {uniq} from 'lodash' @@ -32,6 +32,7 @@ import {useGroupedMessages, usePaginatedScrollingMessages,} from 'web/lib/supaba import {PrivateMessageChannel} from 'common/supabase/private-messages' import {ChatMessage} from 'common/chat-message' import {BackButton} from 'web/components/back-button' +import {SEO} from "web/components/SEO"; export default function PrivateMessagesPage() { const router = useRouter() @@ -44,6 +45,11 @@ export default function PrivateMessagesPage() { } return ( + {router.isReady && channelId && user ? ( ) : ( diff --git a/web/pages/messages/index.tsx b/web/pages/messages/index.tsx index 55ee182d..d256a145 100644 --- a/web/pages/messages/index.tsx +++ b/web/pages/messages/index.tsx @@ -19,6 +19,8 @@ import { useRedirectIfSignedOut } from 'web/hooks/use-redirect-if-signed-out' import { MultipleOrSingleAvatars } from 'web/components/multiple-or-single-avatars' import { BannedBadge } from 'web/components/widgets/user-link' import { PrivateMessageChannel } from 'common/supabase/private-messages' +import {SEO} from "web/components/SEO"; +import React from "react"; export default function MessagesPage() { useRedirectIfSignedOut() @@ -26,6 +28,11 @@ export default function MessagesPage() { const currentUser = useUser() return ( + {currentUser && } ) diff --git a/web/pages/organization.tsx b/web/pages/organization.tsx index 48ff7e61..8a079ed4 100644 --- a/web/pages/organization.tsx +++ b/web/pages/organization.tsx @@ -2,11 +2,18 @@ import {PageBase} from 'web/components/page-base' import {GeneralButton} from "web/components/buttons/general-button"; import clsx from "clsx"; import {Col} from "web/components/layout/col"; +import {SEO} from "web/components/SEO"; +import React from "react"; export default function Organization() { return ( +

Organization

+

Privacy Policy

diff --git a/web/pages/profile.tsx b/web/pages/profile.tsx index 3dd773e2..f3b9efdc 100644 --- a/web/pages/profile.tsx +++ b/web/pages/profile.tsx @@ -5,11 +5,12 @@ import {OptionalProfileUserForm} from 'web/components/optional-profile-form' import {RequiredProfileUserForm} from 'web/components/required-profile-form' import {useProfileByUser} from 'web/hooks/use-profile' import Router from 'next/router' -import {useEffect, useState} from 'react' +import React, {useEffect, useState} from 'react' import {Col} from 'web/components/layout/col' import {useUser} from 'web/hooks/use-user' import {api} from 'web/lib/api' import {PageBase} from "web/components/page-base"; +import {SEO} from "web/components/SEO"; export default function ProfilePage() { const user = useUser() @@ -41,6 +42,11 @@ function ProfilePageInner(props: { user: User; profile: Profile }) { return ( + +

{registrationSuccess ? ( diff --git a/web/pages/signin.tsx b/web/pages/signin.tsx index 16b62452..73ba5449 100644 --- a/web/pages/signin.tsx +++ b/web/pages/signin.tsx @@ -1,7 +1,7 @@ "use client"; import {useSearchParams} from "next/navigation"; -import {Suspense, useEffect, useState} from "react"; +import React, {Suspense, useEffect, useState} from "react"; import Link from "next/link"; import {auth, firebaseLogin} from "web/lib/firebase/users"; import FavIcon from "web/public/FavIcon"; @@ -13,6 +13,7 @@ import Router from "next/router"; import {PageBase} from "web/components/page-base"; import {useUser} from "web/hooks/use-user"; import {GoogleButton} from "web/components/buttons/sign-up-button"; +import {SEO} from "web/components/SEO"; export default function LoginPage() { return ( @@ -118,6 +119,11 @@ function RegisterComponent() { console.debug('Form rendering'); return ( +
diff --git a/web/pages/signup.tsx b/web/pages/signup.tsx index c01dc5f6..9eb92f43 100644 --- a/web/pages/signup.tsx +++ b/web/pages/signup.tsx @@ -1,4 +1,4 @@ -import {useEffect, useRef, useState} from 'react' +import React, {useEffect, useRef, useState} from 'react' import {Col} from 'web/components/layout/col' import {initialRequiredState, RequiredProfileUserForm,} from 'web/components/required-profile-form' import {OptionalProfileUserForm} from 'web/components/optional-profile-form' @@ -14,6 +14,7 @@ import {removeNullOrUndefinedProps} from 'common/util/object' import {useProfileByUserId} from 'web/hooks/use-profile' import {ProfileRow} from 'common/profiles/profile' import {PageBase} from "web/components/page-base"; +import {SEO} from "web/components/SEO"; export default function SignupPage() { const [step, setStep] = useState(0) @@ -72,6 +73,11 @@ export default function SignupPage() { if (step === 1 && user) { return + +

Socials

>({}) @@ -42,7 +43,12 @@ export default function Stats() { }, []) return ( - + +

Growth & Stats

diff --git a/web/pages/support.tsx b/web/pages/support.tsx index 5365aa16..e5f7fd06 100644 --- a/web/pages/support.tsx +++ b/web/pages/support.tsx @@ -8,12 +8,12 @@ const FILENAME = __filename.split('/').pop()?.split('.').shift(); export async function getStaticProps() { const filePath = path.join(process.cwd(), 'public', 'md', FILENAME + '.md'); const content = fs.readFileSync(filePath, 'utf8'); - return {props: {content}}; + return {props: {content, filename: FILENAME}}; } -type Props = { content: string }; +type Props = { content: string, filename: string }; -export default function Faq({content}: Props) { - if (!FILENAME) throw new Error('Could not determine filename'); - return -} +export default function Page({content, filename}: Props) { + if (!filename) throw new Error('Could not determine filename'); + return +} \ No newline at end of file diff --git a/web/pages/terms.tsx b/web/pages/terms.tsx index 7cb5dbb9..298d95f7 100644 --- a/web/pages/terms.tsx +++ b/web/pages/terms.tsx @@ -1,5 +1,7 @@ import {PageBase} from "web/components/page-base"; import {supportEmail} from "common/constants"; +import {SEO} from "web/components/SEO"; +import React from "react"; // TODO: convert to MarkDown for better readability during modifications? export default function TermsPage() { @@ -8,6 +10,11 @@ export default function TermsPage() { trackPageView={'terms'} className="max-w-4xl mx-auto p-8 text-gray-800 dark:text-white col-span-8 bg-canvas-0" > +

Terms & Conditions

diff --git a/web/pages/tips-bio.tsx b/web/pages/tips-bio.tsx index 5365aa16..e5f7fd06 100644 --- a/web/pages/tips-bio.tsx +++ b/web/pages/tips-bio.tsx @@ -8,12 +8,12 @@ const FILENAME = __filename.split('/').pop()?.split('.').shift(); export async function getStaticProps() { const filePath = path.join(process.cwd(), 'public', 'md', FILENAME + '.md'); const content = fs.readFileSync(filePath, 'utf8'); - return {props: {content}}; + return {props: {content, filename: FILENAME}}; } -type Props = { content: string }; +type Props = { content: string, filename: string }; -export default function Faq({content}: Props) { - if (!FILENAME) throw new Error('Could not determine filename'); - return -} +export default function Page({content, filename}: Props) { + if (!filename) throw new Error('Could not determine filename'); + return +} \ No newline at end of file