From 804cd4cbb2d9a45cfe6113ec6c63da3449d16e85 Mon Sep 17 00:00:00 2001
From: DrMint <29893320+DrMint@users.noreply.github.com>
Date: Thu, 11 Jul 2024 20:36:39 +0200
Subject: [PATCH] Added discord url to error messages and 500 page
---
src/components/AppLayout/components/Footer.astro | 4 ++--
src/components/Attributes.astro | 7 +------
src/components/Blocks/Block.astro | 5 +----
src/components/ErrorMessage.astro | 13 ++++++++++++-
src/components/InlineAttributes.astro | 7 +------
.../RichText/components/RTBlock/RTBlock.astro | 5 +----
.../components/RTBlock/components/RTBreak.astro | 5 +----
.../RichText/components/RTLink/RTLink.astro | 5 +----
.../RTLink/components/RTInternalLink.astro | 5 +----
.../RichText/components/RTList/RTList.astro | 5 +----
src/components/RichText/components/RTNode.astro | 5 +----
.../RichText/components/RTUpload/RTUpload.astro | 5 +----
src/pages/500.astro | 2 +-
.../_components/ContentsSection/ContentRow.astro | 16 ++--------------
src/pages/[locale]/folders/[slug].astro | 7 +------
15 files changed, 28 insertions(+), 68 deletions(-)
diff --git a/src/components/AppLayout/components/Footer.astro b/src/components/AppLayout/components/Footer.astro
index 11c0060..c04da33 100644
--- a/src/components/AppLayout/components/Footer.astro
+++ b/src/components/AppLayout/components/Footer.astro
@@ -7,7 +7,7 @@ interface Props {
}
const { withLinks } = Astro.props;
-const { t } = await getI18n(Astro.locals.currentLocale);
+const { t, getLocalizedUrl } = await getI18n(Astro.locals.currentLocale);
const discordLabel = `${t("footer.socials.discord.title")} - ${t(
"footer.socials.discord.subtitle"
@@ -30,7 +30,7 @@ const contactLabel = `${t("footer.socials.contact.title")} - ${t(
{
withLinks && (
-
+
{t("footer.socials.discord.title")}
diff --git a/src/components/Attributes.astro b/src/components/Attributes.astro
index b4169f1..881b1d7 100644
--- a/src/components/Attributes.astro
+++ b/src/components/Attributes.astro
@@ -67,12 +67,7 @@ const { getLocalizedMatch, getLocalizedUrl, formatNumber } = await getI18n(
);
default:
- return (
-
- );
+ return
;
}
})
}
diff --git a/src/components/Blocks/Block.astro b/src/components/Blocks/Block.astro
index eaa5556..c9aba1e 100644
--- a/src/components/Blocks/Block.astro
+++ b/src/components/Blocks/Block.astro
@@ -25,9 +25,6 @@ const { block, lang } = Astro.props;
) : isBlockCueBlock(block) ? (
) : (
-
+
)
}
diff --git a/src/components/ErrorMessage.astro b/src/components/ErrorMessage.astro
index 47a611a..b887e97 100644
--- a/src/components/ErrorMessage.astro
+++ b/src/components/ErrorMessage.astro
@@ -1,11 +1,14 @@
---
import { Icon } from "astro-icon/components";
+import { getI18n } from "src/i18n/i18n";
interface Props {
title: string;
description?: string;
}
+const { getLocalizedUrl } = await getI18n(Astro.locals.currentLocale);
+
const { title, description } = Astro.props;
---
@@ -14,7 +17,15 @@ const { title, description } = Astro.props;
{/* ------------------------------------------- CSS -------------------------------------------- */}
diff --git a/src/components/InlineAttributes.astro b/src/components/InlineAttributes.astro
index 7f44664..f3ba8c7 100644
--- a/src/components/InlineAttributes.astro
+++ b/src/components/InlineAttributes.astro
@@ -67,12 +67,7 @@ const { getLocalizedMatch, getLocalizedUrl, formatNumber } = await getI18n(
);
default:
- return (
-
- );
+ return
;
}
})
}
diff --git a/src/components/RichText/components/RTBlock/RTBlock.astro b/src/components/RichText/components/RTBlock/RTBlock.astro
index 69fd4af..a2a4620 100644
--- a/src/components/RichText/components/RTBlock/RTBlock.astro
+++ b/src/components/RichText/components/RTBlock/RTBlock.astro
@@ -29,9 +29,6 @@ const { node, context } = Astro.props;
) : isBlockNodeBreakBlock(node) ? (
) : (
-
+
)
}
diff --git a/src/components/RichText/components/RTBlock/components/RTBreak.astro b/src/components/RichText/components/RTBlock/components/RTBreak.astro
index 420c977..0db64c7 100644
--- a/src/components/RichText/components/RTBlock/components/RTBreak.astro
+++ b/src/components/RichText/components/RTBlock/components/RTBreak.astro
@@ -29,10 +29,7 @@ const { node } = Astro.props;
) : node.fields.type === BreakBlockType.solidLine ? (
) : (
-
+
)
}
diff --git a/src/components/RichText/components/RTLink/RTLink.astro b/src/components/RichText/components/RTLink/RTLink.astro
index 6cafe69..2b7c1f0 100644
--- a/src/components/RichText/components/RTLink/RTLink.astro
+++ b/src/components/RichText/components/RTLink/RTLink.astro
@@ -34,9 +34,6 @@ const { node, context } = Astro.props;
))}
) : (
-
+
)
}
diff --git a/src/components/RichText/components/RTLink/components/RTInternalLink.astro b/src/components/RichText/components/RTLink/components/RTInternalLink.astro
index 30b4c54..0ee8723 100644
--- a/src/components/RichText/components/RTLink/components/RTInternalLink.astro
+++ b/src/components/RichText/components/RTLink/components/RTInternalLink.astro
@@ -30,9 +30,6 @@ const { getLocalizedUrl } = await getI18n(Astro.locals.currentLocale);
) : (
-
+
)
}
diff --git a/src/components/RichText/components/RTList/RTList.astro b/src/components/RichText/components/RTList/RTList.astro
index 9af44c6..7fb133a 100644
--- a/src/components/RichText/components/RTList/RTList.astro
+++ b/src/components/RichText/components/RTList/RTList.astro
@@ -40,9 +40,6 @@ const { node, context } = Astro.props;
))}
) : (
-
+
)
}
diff --git a/src/components/RichText/components/RTNode.astro b/src/components/RichText/components/RTNode.astro
index 4611734..b79211c 100644
--- a/src/components/RichText/components/RTNode.astro
+++ b/src/components/RichText/components/RTNode.astro
@@ -49,9 +49,6 @@ const { node, context } = Astro.props;
) : isNodeUploadNode(node) ? (
) : (
-
+
)
}
diff --git a/src/components/RichText/components/RTUpload/RTUpload.astro b/src/components/RichText/components/RTUpload/RTUpload.astro
index 8538189..3297da7 100644
--- a/src/components/RichText/components/RTUpload/RTUpload.astro
+++ b/src/components/RichText/components/RTUpload/RTUpload.astro
@@ -29,9 +29,6 @@ const { node, context } = Astro.props;
) : isUploadNodeVideoNode(node) ? (
) : (
-
+
)
}
diff --git a/src/pages/500.astro b/src/pages/500.astro
index d6390f0..d4f712f 100644
--- a/src/pages/500.astro
+++ b/src/pages/500.astro
@@ -19,7 +19,7 @@ const { t, getLocalizedUrl } = await getI18n(Astro.locals.currentLocale);
500
Server Error
-
Please contact website technical administrator.
+
Please contact website technical administrator.
diff --git a/src/pages/[locale]/collectibles/[slug]/_components/ContentsSection/ContentRow.astro b/src/pages/[locale]/collectibles/[slug]/_components/ContentsSection/ContentRow.astro
index b0439a2..bbaef28 100644
--- a/src/pages/[locale]/collectibles/[slug]/_components/ContentsSection/ContentRow.astro
+++ b/src/pages/[locale]/collectibles/[slug]/_components/ContentsSection/ContentRow.astro
@@ -67,16 +67,7 @@ const { title, language } = (() => {
- {
- title ? (
-
{title}
- ) : (
-
- )
- }
+ {title ?
{title}
:
}
@@ -94,10 +85,7 @@ const { title, language } = (() => {
content={getLocalizedMatch(range.translations).note}
/> /* TODO: Provide lang */
) : (
-
+
)}
>
)
diff --git a/src/pages/[locale]/folders/[slug].astro b/src/pages/[locale]/folders/[slug].astro
index ca5ca2e..ff0e0e2 100644
--- a/src/pages/[locale]/folders/[slug].astro
+++ b/src/pages/[locale]/folders/[slug].astro
@@ -81,12 +81,7 @@ const { language, title, description } = getLocalizedMatch(translations);
return ;
default:
- return (
-
- );
+ return ;
}
})
}
{t("footer.socials.discord.title")}
diff --git a/src/components/Attributes.astro b/src/components/Attributes.astro index b4169f1..881b1d7 100644 --- a/src/components/Attributes.astro +++ b/src/components/Attributes.astro @@ -67,12 +67,7 @@ const { getLocalizedMatch, getLocalizedUrl, formatNumber } = await getI18n( ); default: - return ( -) : ( -
500
Server Error
-Please contact website technical administrator.
+Please contact website technical administrator.
diff --git a/src/pages/[locale]/collectibles/[slug]/_components/ContentsSection/ContentRow.astro b/src/pages/[locale]/collectibles/[slug]/_components/ContentsSection/ContentRow.astro index b0439a2..bbaef28 100644 --- a/src/pages/[locale]/collectibles/[slug]/_components/ContentsSection/ContentRow.astro +++ b/src/pages/[locale]/collectibles/[slug]/_components/ContentsSection/ContentRow.astro @@ -67,16 +67,7 @@ const { title, language } = (() => {{title}
- ) : ( -{title}
: