chore: Update translations
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
import { ReactNode, useEffect, useState } from "react";
|
import { ReactNode, useEffect, useState } from "react";
|
||||||
|
|
||||||
export function Async<T>({ loader, then }: { loader: () => Promise<T>, then: (v: T) => ReactNode }) {
|
export function Async<T>({ loader, then }: { loader: () => Promise<T>; then: (v: T) => ReactNode }) {
|
||||||
const [res, setResult] = useState<T>();
|
const [res, setResult] = useState<T>();
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
loader().then(setResult);
|
loader().then(setResult);
|
||||||
|
@ -14,7 +14,6 @@ interface MarkdownProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Markdown = forwardRef<HTMLDivElement, MarkdownProps>((props: MarkdownProps, ref) => {
|
const Markdown = forwardRef<HTMLDivElement, MarkdownProps>((props: MarkdownProps, ref) => {
|
||||||
|
|
||||||
function renderToken(t: Token): ReactNode {
|
function renderToken(t: Token): ReactNode {
|
||||||
try {
|
try {
|
||||||
switch (t.type) {
|
switch (t.type) {
|
||||||
@ -76,18 +75,26 @@ const Markdown = forwardRef<HTMLDivElement, MarkdownProps>((props: MarkdownProps
|
|||||||
return <s>{t.tokens ? t.tokens.map(renderToken) : t.raw}</s>;
|
return <s>{t.tokens ? t.tokens.map(renderToken) : t.raw}</s>;
|
||||||
}
|
}
|
||||||
case "table": {
|
case "table": {
|
||||||
return <table className="table-auto border-collapse">
|
return (
|
||||||
|
<table className="table-auto border-collapse">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
{(t.header as Tokens.TableCell[]).map(v => <th className="border">{v.tokens ? v.tokens.map(renderToken) : v.text}</th>)}
|
{(t.header as Tokens.TableCell[]).map(v => (
|
||||||
|
<th className="border">{v.tokens ? v.tokens.map(renderToken) : v.text}</th>
|
||||||
|
))}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{(t.rows as Tokens.TableCell[][]).map(v => <tr>
|
{(t.rows as Tokens.TableCell[][]).map(v => (
|
||||||
{v.map(d => <td className="border px-2 py-1">{d.tokens ? d.tokens.map(renderToken) : d.text}</td>)}
|
<tr>
|
||||||
</tr>)}
|
{v.map(d => (
|
||||||
|
<td className="border px-2 py-1">{d.tokens ? d.tokens.map(renderToken) : d.text}</td>
|
||||||
|
))}
|
||||||
|
</tr>
|
||||||
|
))}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>;
|
</table>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
if ("tokens" in t) {
|
if ("tokens" in t) {
|
||||||
@ -104,7 +111,6 @@ const Markdown = forwardRef<HTMLDivElement, MarkdownProps>((props: MarkdownProps
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const parsed = useMemo(() => {
|
const parsed = useMemo(() => {
|
||||||
return marked.lexer(props.content);
|
return marked.lexer(props.content);
|
||||||
}, [props.content, props.tags]);
|
}, [props.content, props.tags]);
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
# FAQ
|
# FAQ
|
||||||
|
|
||||||
# Reccomended Stream Settings
|
# Reccomended Stream Settings
|
||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| - | - |
|
| ----------------- | ----- |
|
||||||
| Video Codec | h264 |
|
| Video Codec | h264 |
|
||||||
| Audio Codec | AAC |
|
| Audio Codec | AAC |
|
||||||
| Max Video Bitrate | 7000k |
|
| Max Video Bitrate | 7000k |
|
||||||
@ -10,4 +11,5 @@
|
|||||||
| Keyframe Interval | 2s |
|
| Keyframe Interval | 2s |
|
||||||
|
|
||||||
### Example settings in OBS (Apple M1 Mac):
|
### Example settings in OBS (Apple M1 Mac):
|
||||||
|
|
||||||

|

|
@ -109,10 +109,15 @@ const router = createBrowserRouter([
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/faq",
|
path: "/faq",
|
||||||
element: <Async loader={async () => {
|
element: (
|
||||||
|
<Async
|
||||||
|
loader={async () => {
|
||||||
const req = await fetch(Faq);
|
const req = await fetch(Faq);
|
||||||
return await req.text();
|
return await req.text();
|
||||||
}} then={(v) => <Markdown content={v} tags={[]} plainText={true} />} />
|
}}
|
||||||
|
then={v => <Markdown content={v} tags={[]} plainText={true} />}
|
||||||
|
/>
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "*",
|
path: "*",
|
||||||
|
Reference in New Issue
Block a user