fix: fix build errors

This commit is contained in:
Paul Makles 2022-01-07 21:43:00 +00:00
parent 81af91fa1f
commit 8d1e26d03e
2 changed files with 3 additions and 4 deletions

View file

@ -52,7 +52,7 @@ export default observer(({ user }: Props) => {
const { writeClipboard } = useIntermediate(); const { writeClipboard } = useIntermediate();
return ( return (
<Header borders placement="secondary"> <Header topBorder placement="secondary">
<HeaderBase> <HeaderBase>
<Localizer> <Localizer>
<Tooltip content={<Text id="app.special.copy_username" />}> <Tooltip content={<Text id="app.special.copy_username" />}>

View file

@ -17,6 +17,7 @@ import { useCallback, useContext } from "preact/hooks";
import { internalEmit } from "../../lib/eventEmitter"; import { internalEmit } from "../../lib/eventEmitter";
import { determineLink } from "../../lib/links"; import { determineLink } from "../../lib/links";
import { dayjs } from "../../context/Locale";
import { useIntermediate } from "../../context/intermediate/Intermediate"; import { useIntermediate } from "../../context/intermediate/Intermediate";
import { AppContext } from "../../context/revoltjs/RevoltClient"; import { AppContext } from "../../context/revoltjs/RevoltClient";
@ -26,8 +27,6 @@ import { emojiDictionary } from "../../assets/emojis";
import { MarkdownProps } from "./Markdown"; import { MarkdownProps } from "./Markdown";
import Prism from "./prism"; import Prism from "./prism";
import { dayjs } from "../../context/Locale";
// TODO: global.d.ts file for defining globals // TODO: global.d.ts file for defining globals
declare global { declare global {
interface Window { interface Window {
@ -136,7 +135,7 @@ export default function Renderer({ content, disallowBigEmoji }: MarkdownProps) {
// We don't care if the mention changes. // We don't care if the mention changes.
const newContent = content const newContent = content
.replace(RE_TIME, (sub: string, ...args: unknown[]) => { .replace(RE_TIME, (sub: string, ...args: unknown[]) => {
if (isNaN(args[0] as string)) return sub; if (isNaN(args[0] as number)) return sub;
const date = dayjs.unix(args[0] as number); const date = dayjs.unix(args[0] as number);
const format = args[1] as string; const format = args[1] as string;
let final = ""; let final = "";