From 7d821d1c42a8fb268f321d15be2fad3b6ce1438d Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Fri, 28 Jul 2023 09:20:02 +0800 Subject: [PATCH] Vendor the mathjax and highlightjs code to avoid CSP loading --- packages/web/components/elements/images/AIcon.tsx | 14 -------------- .../web/components/templates/article/Article.tsx | 2 +- packages/web/pages/[username]/[slug]/index.tsx | 4 ++-- packages/web/pages/app/[username]/[slug]/index.tsx | 7 ++++--- .../{scripts => mathjax}/mathJaxConfiguration.js | 0 5 files changed, 7 insertions(+), 20 deletions(-) delete mode 100644 packages/web/components/elements/images/AIcon.tsx rename packages/web/public/static/{scripts => mathjax}/mathJaxConfiguration.js (100%) diff --git a/packages/web/components/elements/images/AIcon.tsx b/packages/web/components/elements/images/AIcon.tsx deleted file mode 100644 index f7972a2f0..000000000 --- a/packages/web/components/elements/images/AIcon.tsx +++ /dev/null @@ -1,14 +0,0 @@ -type AIconProps = { - size: number - color: string - style?: React.CSSProperties -} - -export function AIcon(props: AIconProps): JSX.Element { - return ( - - - - - ) -} \ No newline at end of file diff --git a/packages/web/components/templates/article/Article.tsx b/packages/web/components/templates/article/Article.tsx index a692d877b..ce8565c56 100644 --- a/packages/web/components/templates/article/Article.tsx +++ b/packages/web/components/templates/article/Article.tsx @@ -223,7 +223,7 @@ export function Article(props: ArticleProps): JSX.Element { <> -