mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-14 12:47:21 -04:00
Translate .md files
This commit is contained in:
13
web/components/MarkdownPageLoader.tsx
Normal file
13
web/components/MarkdownPageLoader.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
'use client'
|
||||
|
||||
import MarkdownPage, {MD_PATHS} from 'web/components/markdown'
|
||||
import {useMarkdown} from "web/hooks/use-markdown"
|
||||
|
||||
type Props = {
|
||||
filename: typeof MD_PATHS[number]
|
||||
}
|
||||
|
||||
export function MarkdownPageLoader({filename}: Props) {
|
||||
const content = useMarkdown(filename)
|
||||
return <MarkdownPage content={content} filename={filename}/>
|
||||
}
|
||||
@@ -5,9 +5,18 @@ import {SEO} from "web/components/SEO";
|
||||
import {capitalize} from "lodash";
|
||||
import {CustomLink} from "web/components/links";
|
||||
|
||||
export const MD_PATHS = [
|
||||
'constitution',
|
||||
'faq',
|
||||
'financials',
|
||||
'members',
|
||||
'support',
|
||||
'tips-bio',
|
||||
] as const
|
||||
|
||||
type Props = {
|
||||
content: string;
|
||||
filename: string;
|
||||
filename: typeof MD_PATHS[number];
|
||||
};
|
||||
|
||||
export const CustomMarkdown = ({children}: { children: string }) => {
|
||||
|
||||
Reference in New Issue
Block a user