acc + groupCountingFunction(item),
+ 0
+ )} ${
groupItems.length <= 1
? langui.result?.toLowerCase() ?? ""
: langui.results?.toLowerCase() ?? ""
diff --git a/src/components/Translated.tsx b/src/components/Translated.tsx
index 7ed535f..deb2c9e 100644
--- a/src/components/Translated.tsx
+++ b/src/components/Translated.tsx
@@ -2,13 +2,13 @@ import { PreviewCard } from "./PreviewCard";
import { PreviewLine } from "./PreviewLine";
import { ScanSet } from "./Library/ScanSet";
import { NavOption } from "./PanelComponents/NavOption";
-import { AppStaticProps } from "graphql/getAppStaticProps";
+import { ChroniclePreview } from "./Chronicles/ChroniclePreview";
+import { ChroniclesList } from "./Chronicles/ChroniclesList";
import { useSmartLanguage } from "hooks/useSmartLanguage";
type TranslatedProps = Omit
& {
translations: (Pick
& { language: string })[];
fallback: Pick
;
- languages: AppStaticProps["languages"];
};
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
@@ -18,18 +18,18 @@ type TranslatedPreviewCardProps = TranslatedProps<
"description" | "pre_title" | "subtitle" | "title"
>;
+const languageExtractor = (item: { language: string }): string => item.language;
+
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
export const TranslatedPreviewCard = ({
translations,
- languages,
fallback,
...otherProps
}: TranslatedPreviewCardProps): JSX.Element => {
const [selectedTranslation] = useSmartLanguage({
items: translations,
- languages: languages,
- languageExtractor: (item) => item.language,
+ languageExtractor,
});
return (
@@ -45,23 +45,18 @@ export const TranslatedPreviewCard = ({
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-type TranslatedPreviewLineProps = TranslatedProps<
- Parameters[0],
- "pre_title" | "subtitle" | "title"
->;
-
-// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-
export const TranslatedPreviewLine = ({
translations,
- languages,
fallback,
...otherProps
-}: TranslatedPreviewLineProps): JSX.Element => {
+}: TranslatedProps<
+ Parameters[0],
+ "pre_title" | "subtitle" | "title"
+>): JSX.Element => {
const [selectedTranslation] = useSmartLanguage({
items: translations,
- languages: languages,
- languageExtractor: (item) => item.language,
+
+ languageExtractor,
});
return (
@@ -76,29 +71,19 @@ export const TranslatedPreviewLine = ({
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-type TranslatedScanSetProps = TranslatedProps<
- Parameters[0],
- "title"
->;
-
-// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-
export const TranslatedScanSet = ({
translations,
- languages,
fallback,
...otherProps
-}: TranslatedScanSetProps): JSX.Element => {
+}: TranslatedProps[0], "title">): JSX.Element => {
const [selectedTranslation] = useSmartLanguage({
items: translations,
- languages: languages,
- languageExtractor: (item) => item.language,
+ languageExtractor,
});
return (
);
@@ -106,23 +91,17 @@ export const TranslatedScanSet = ({
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-type TranslatedNavOptionProps = TranslatedProps<
- Parameters[0],
- "subtitle" | "title"
->;
-
-// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-
export const TranslatedNavOption = ({
translations,
- languages,
fallback,
...otherProps
-}: TranslatedNavOptionProps): JSX.Element => {
+}: TranslatedProps<
+ Parameters[0],
+ "subtitle" | "title"
+>): JSX.Element => {
const [selectedTranslation] = useSmartLanguage({
items: translations,
- languages: languages,
- languageExtractor: (item) => item.language,
+ languageExtractor,
});
return (
@@ -133,3 +112,49 @@ export const TranslatedNavOption = ({
/>
);
};
+
+// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
+
+export const TranslatedChroniclePreview = ({
+ translations,
+ fallback,
+ ...otherProps
+}: TranslatedProps<
+ Parameters[0],
+ "title"
+>): JSX.Element => {
+ const [selectedTranslation] = useSmartLanguage({
+ items: translations,
+ languageExtractor,
+ });
+
+ return (
+
+ );
+};
+
+// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
+
+export const TranslatedChroniclesList = ({
+ translations,
+ fallback,
+ ...otherProps
+}: TranslatedProps<
+ Parameters[0],
+ "title"
+>): JSX.Element => {
+ const [selectedTranslation] = useSmartLanguage({
+ items: translations,
+ languageExtractor,
+ });
+
+ return (
+
+ );
+};
diff --git a/src/graphql/fragments/recorderChip.graphql b/src/graphql/fragments/recorderChip.graphql
index 41d3a23..8255a81 100644
--- a/src/graphql/fragments/recorderChip.graphql
+++ b/src/graphql/fragments/recorderChip.graphql
@@ -6,7 +6,7 @@ fragment recorderChip on Recorder {
bio(filters: { language: { code: { eq: $language_code } } }) {
bio
}
- languages {
+ languages(pagination: { limit: -1 }) {
data {
attributes {
code
diff --git a/src/graphql/operations/devGetContents.graphql b/src/graphql/operations/devGetContents.graphql
index 33070b0..78e1c94 100644
--- a/src/graphql/operations/devGetContents.graphql
+++ b/src/graphql/operations/devGetContents.graphql
@@ -4,7 +4,7 @@ query devGetContents {
id
attributes {
slug
- categories {
+ categories(pagination: { limit: -1 }) {
data {
id
}
@@ -15,12 +15,12 @@ query devGetContents {
}
}
- ranged_contents {
+ ranged_contents(pagination: { limit: -1 }) {
data {
id
}
}
- translations {
+ translations(pagination: { limit: -1 }) {
language {
data {
id
@@ -41,17 +41,17 @@ query devGetContents {
}
}
status
- transcribers {
+ transcribers(pagination: { limit: -1 }) {
data {
id
}
}
- translators {
+ translators(pagination: { limit: -1 }) {
data {
id
}
}
- proofreaders {
+ proofreaders(pagination: { limit: -1 }) {
data {
id
}
diff --git a/src/graphql/operations/devGetLibraryItems.graphql b/src/graphql/operations/devGetLibraryItems.graphql
index e6fecfd..b7dfed7 100644
--- a/src/graphql/operations/devGetLibraryItems.graphql
+++ b/src/graphql/operations/devGetLibraryItems.graphql
@@ -9,7 +9,7 @@ query devGetLibraryItems {
id
}
}
- subitems {
+ subitems(pagination: { limit: -1 }) {
data {
id
}
@@ -41,7 +41,7 @@ query devGetLibraryItems {
month
day
}
- descriptions {
+ descriptions(pagination: { limit: -1 }) {
description
language {
data {
@@ -49,13 +49,13 @@ query devGetLibraryItems {
}
}
}
- contents {
+ contents(pagination: { limit: -1 }) {
data {
id
}
}
digital
- categories {
+ categories(pagination: { limit: -1 }) {
data {
id
}
@@ -63,7 +63,7 @@ query devGetLibraryItems {
urls {
url
}
- images {
+ images(pagination: { limit: -1 }) {
language {
data {
id
@@ -75,17 +75,17 @@ query devGetLibraryItems {
}
}
status
- scanners {
+ scanners(pagination: { limit: -1 }) {
data {
id
}
}
- cleaners {
+ cleaners(pagination: { limit: -1 }) {
data {
id
}
}
- typesetters {
+ typesetters(pagination: { limit: -1 }) {
data {
id
}
diff --git a/src/graphql/operations/getChronicle.graphql b/src/graphql/operations/getChronicle.graphql
new file mode 100644
index 0000000..6faf112
--- /dev/null
+++ b/src/graphql/operations/getChronicle.graphql
@@ -0,0 +1,165 @@
+query getChronicle($slug: String, $language_code: String) {
+ chronicles(filters: { slug: { eq: $slug } }) {
+ data {
+ attributes {
+ slug
+ date_start {
+ year
+ month
+ day
+ }
+ date_end {
+ year
+ month
+ day
+ }
+ chapter {
+ data {
+ attributes {
+ slug
+ titles {
+ title
+ language {
+ data {
+ attributes {
+ code
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ translations {
+ title
+ summary
+ language {
+ data {
+ attributes {
+ code
+ }
+ }
+ }
+ body {
+ source_language {
+ data {
+ attributes {
+ code
+ }
+ }
+ }
+ status
+ body
+ authors {
+ data {
+ attributes {
+ ...recorderChip
+ }
+ }
+ }
+ translators {
+ data {
+ attributes {
+ ...recorderChip
+ }
+ }
+ }
+ proofreaders {
+ data {
+ attributes {
+ ...recorderChip
+ }
+ }
+ }
+ }
+ }
+ contents {
+ data {
+ id
+ attributes {
+ slug
+ categories(pagination: { limit: -1 }) {
+ data {
+ id
+ attributes {
+ name
+ short
+ }
+ }
+ }
+ type {
+ data {
+ attributes {
+ slug
+ titles(
+ filters: { language: { code: { eq: $language_code } } }
+ ) {
+ title
+ }
+ }
+ }
+ }
+ translations(pagination: { limit: -1 }) {
+ language {
+ data {
+ attributes {
+ code
+ }
+ }
+ }
+ pre_title
+ title
+ subtitle
+ description
+ text_set {
+ status
+ text
+ source_language {
+ data {
+ attributes {
+ code
+ }
+ }
+ }
+ transcribers(pagination: { limit: -1 }) {
+ data {
+ id
+ attributes {
+ ...recorderChip
+ }
+ }
+ }
+ translators(pagination: { limit: -1 }) {
+ data {
+ id
+ attributes {
+ ...recorderChip
+ }
+ }
+ }
+ proofreaders(pagination: { limit: -1 }) {
+ data {
+ id
+ attributes {
+ ...recorderChip
+ }
+ }
+ }
+ notes
+ }
+ }
+
+ thumbnail {
+ data {
+ attributes {
+ ...uploadImage
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/graphql/operations/getChroniclesChapters.graphql b/src/graphql/operations/getChroniclesChapters.graphql
new file mode 100644
index 0000000..1744a94
--- /dev/null
+++ b/src/graphql/operations/getChroniclesChapters.graphql
@@ -0,0 +1,77 @@
+query getChroniclesChapters {
+ chroniclesChapters(pagination: { limit: -1 }) {
+ data {
+ id
+ attributes {
+ slug
+ titles(pagination: { limit: -1 }) {
+ title
+ language {
+ data {
+ attributes {
+ code
+ }
+ }
+ }
+ }
+ chronicles(pagination: { limit: -1 }) {
+ data {
+ id
+ attributes {
+ slug
+ contents(pagination: { limit: -1 }) {
+ data {
+ attributes {
+ translations(pagination: { limit: -1 }) {
+ pre_title
+ title
+ subtitle
+ language {
+ data {
+ attributes {
+ code
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ translations(pagination: { limit: -1 }) {
+ title
+ language {
+ data {
+ attributes {
+ code
+ }
+ }
+ }
+ }
+ date_start {
+ year
+ month
+ day
+ }
+ chapter {
+ data {
+ attributes {
+ titles(pagination: { limit: -1 }) {
+ title
+ language {
+ data {
+ attributes {
+ code
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/graphql/operations/getChroniclesSlugs.graphql b/src/graphql/operations/getChroniclesSlugs.graphql
new file mode 100644
index 0000000..ae76363
--- /dev/null
+++ b/src/graphql/operations/getChroniclesSlugs.graphql
@@ -0,0 +1,9 @@
+query getChroniclesSlugs {
+ chronicles(pagination: { limit: -1 }) {
+ data {
+ attributes {
+ slug
+ }
+ }
+ }
+}
diff --git a/src/graphql/operations/getChronologyItems.graphql b/src/graphql/operations/getChronologyItems.graphql
index daef501..fb8ff20 100644
--- a/src/graphql/operations/getChronologyItems.graphql
+++ b/src/graphql/operations/getChronologyItems.graphql
@@ -1,4 +1,4 @@
-query getChronologyItems($language_code: String) {
+query getChronologyItems {
chronologyItems(
pagination: { limit: -1 }
sort: ["year:asc", "month:asc", "day:asc"]
@@ -10,7 +10,7 @@ query getChronologyItems($language_code: String) {
month
day
displayed_date
- events {
+ events(pagination: { limit: -1 }) {
id
source {
data {
@@ -19,9 +19,7 @@ query getChronologyItems($language_code: String) {
}
}
}
- translations(
- filters: { language: { code: { eq: $language_code } } }
- ) {
+ translations(pagination: { limit: -1 }) {
title
description
note
diff --git a/src/graphql/operations/getContentText.graphql b/src/graphql/operations/getContentText.graphql
index 5b186c5..de192ba 100644
--- a/src/graphql/operations/getContentText.graphql
+++ b/src/graphql/operations/getContentText.graphql
@@ -4,8 +4,7 @@ query getContentText($slug: String, $language_code: String) {
id
attributes {
slug
-
- categories {
+ categories(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -52,7 +51,7 @@ query getContentText($slug: String, $language_code: String) {
price {
...pricePicker
}
- categories {
+ categories(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -80,7 +79,7 @@ query getContentText($slug: String, $language_code: String) {
}
}
... on ComponentMetadataGame {
- platforms {
+ platforms(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -180,7 +179,7 @@ query getContentText($slug: String, $language_code: String) {
}
}
}
- transcribers {
+ transcribers(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -188,7 +187,7 @@ query getContentText($slug: String, $language_code: String) {
}
}
}
- translators {
+ translators(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -196,7 +195,7 @@ query getContentText($slug: String, $language_code: String) {
}
}
}
- proofreaders {
+ proofreaders(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -222,7 +221,7 @@ query getContentText($slug: String, $language_code: String) {
data {
attributes {
slug
- translations {
+ translations(pagination: { limit: -1 }) {
pre_title
title
subtitle
@@ -234,7 +233,7 @@ query getContentText($slug: String, $language_code: String) {
}
}
}
- categories {
+ categories(pagination: { limit: -1 }) {
data {
id
attributes {
diff --git a/src/graphql/operations/getContents.graphql b/src/graphql/operations/getContents.graphql
index 21b1657..46a7a6d 100644
--- a/src/graphql/operations/getContents.graphql
+++ b/src/graphql/operations/getContents.graphql
@@ -4,7 +4,7 @@ query getContents($language_code: String) {
id
attributes {
slug
- translations {
+ translations(pagination: { limit: -1 }) {
pre_title
title
subtitle
@@ -16,7 +16,7 @@ query getContents($language_code: String) {
}
}
}
- categories {
+ categories(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -35,7 +35,7 @@ query getContents($language_code: String) {
}
}
}
- ranged_contents {
+ ranged_contents(pagination: { limit: -1 }) {
data {
id
attributes {
diff --git a/src/graphql/operations/getCurrencies.graphql b/src/graphql/operations/getCurrencies.graphql
index 87f50dc..d34c90e 100644
--- a/src/graphql/operations/getCurrencies.graphql
+++ b/src/graphql/operations/getCurrencies.graphql
@@ -1,5 +1,5 @@
query getCurrencies {
- currencies {
+ currencies(pagination: { limit: -1 }) {
data {
id
attributes {
diff --git a/src/graphql/operations/getEras.graphql b/src/graphql/operations/getEras.graphql
index 949276e..f2a0f36 100644
--- a/src/graphql/operations/getEras.graphql
+++ b/src/graphql/operations/getEras.graphql
@@ -1,12 +1,12 @@
-query getEras($language_code: String) {
- chronologyEras(sort: "starting_year") {
+query getEras {
+ chronologyEras(pagination: { limit: -1 }, sort: "starting_year") {
data {
id
attributes {
slug
starting_year
ending_year
- title(filters: { language: { code: { eq: $language_code } } }) {
+ title(pagination: { limit: -1 }) {
title
description
}
diff --git a/src/graphql/operations/getLanguages.graphql b/src/graphql/operations/getLanguages.graphql
index 8398650..bc820ff 100644
--- a/src/graphql/operations/getLanguages.graphql
+++ b/src/graphql/operations/getLanguages.graphql
@@ -1,5 +1,5 @@
query getLanguages {
- languages {
+ languages(pagination: { limit: -1 }) {
data {
id
attributes {
diff --git a/src/graphql/operations/getLibraryItem.graphql b/src/graphql/operations/getLibraryItem.graphql
index 5f588d6..800677d 100644
--- a/src/graphql/operations/getLibraryItem.graphql
+++ b/src/graphql/operations/getLibraryItem.graphql
@@ -30,7 +30,7 @@ query getLibraryItem($slug: String, $language_code: String) {
price {
...pricePicker
}
- categories {
+ categories(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -39,7 +39,7 @@ query getLibraryItem($slug: String, $language_code: String) {
}
}
}
- urls {
+ urls(pagination: { limit: -1 }) {
url
}
size {
@@ -47,7 +47,7 @@ query getLibraryItem($slug: String, $language_code: String) {
height
thickness
}
- descriptions(filters: { language: { code: { eq: $language_code } } }) {
+ descriptions(pagination: { limit: -1 }) {
description
}
metadata {
@@ -68,7 +68,7 @@ query getLibraryItem($slug: String, $language_code: String) {
binding_type
page_count
page_order
- languages {
+ languages(pagination: { limit: -1 }) {
data {
attributes {
code
@@ -92,7 +92,7 @@ query getLibraryItem($slug: String, $language_code: String) {
}
}
... on ComponentMetadataGame {
- platforms {
+ platforms(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -100,7 +100,7 @@ query getLibraryItem($slug: String, $language_code: String) {
}
}
}
- audio_languages {
+ audio_languages(pagination: { limit: -1 }) {
data {
attributes {
code
@@ -108,7 +108,7 @@ query getLibraryItem($slug: String, $language_code: String) {
}
}
}
- sub_languages {
+ sub_languages(pagination: { limit: -1 }) {
data {
attributes {
code
@@ -116,7 +116,7 @@ query getLibraryItem($slug: String, $language_code: String) {
}
}
}
- interface_languages {
+ interface_languages(pagination: { limit: -1 }) {
data {
attributes {
code
@@ -196,7 +196,7 @@ query getLibraryItem($slug: String, $language_code: String) {
price {
...pricePicker
}
- categories {
+ categories(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -299,7 +299,7 @@ query getLibraryItem($slug: String, $language_code: String) {
}
}
}
- submerchs {
+ submerchs(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -339,7 +339,7 @@ query getLibraryItem($slug: String, $language_code: String) {
data {
attributes {
slug
- categories {
+ categories(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -362,7 +362,7 @@ query getLibraryItem($slug: String, $language_code: String) {
}
}
}
- translations {
+ translations(pagination: { limit: -1 }) {
language {
data {
attributes {
diff --git a/src/graphql/operations/getLibraryItemScans.graphql b/src/graphql/operations/getLibraryItemScans.graphql
index ab96195..fc41edb 100644
--- a/src/graphql/operations/getLibraryItemScans.graphql
+++ b/src/graphql/operations/getLibraryItemScans.graphql
@@ -6,7 +6,7 @@ query getLibraryItemScans($slug: String, $language_code: String) {
slug
title
subtitle
- images {
+ images(pagination: { limit: -1 }) {
status
language {
data {
@@ -22,7 +22,7 @@ query getLibraryItemScans($slug: String, $language_code: String) {
}
}
}
- scanners {
+ scanners(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -30,7 +30,7 @@ query getLibraryItemScans($slug: String, $language_code: String) {
}
}
}
- cleaners {
+ cleaners(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -38,7 +38,7 @@ query getLibraryItemScans($slug: String, $language_code: String) {
}
}
}
- typesetters {
+ typesetters(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -108,7 +108,7 @@ query getLibraryItemScans($slug: String, $language_code: String) {
price {
...pricePicker
}
- categories {
+ categories(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -218,7 +218,7 @@ query getLibraryItemScans($slug: String, $language_code: String) {
data {
attributes {
slug
- translations {
+ translations(pagination: { limit: -1 }) {
pre_title
title
subtitle
@@ -249,7 +249,7 @@ query getLibraryItemScans($slug: String, $language_code: String) {
}
}
}
- scanners {
+ scanners(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -257,7 +257,7 @@ query getLibraryItemScans($slug: String, $language_code: String) {
}
}
}
- cleaners {
+ cleaners(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -265,7 +265,7 @@ query getLibraryItemScans($slug: String, $language_code: String) {
}
}
}
- typesetters {
+ typesetters(pagination: { limit: -1 }) {
data {
id
attributes {
diff --git a/src/graphql/operations/getLibraryItemsPreview.graphql b/src/graphql/operations/getLibraryItemsPreview.graphql
index 0637914..f3e52af 100644
--- a/src/graphql/operations/getLibraryItemsPreview.graphql
+++ b/src/graphql/operations/getLibraryItemsPreview.graphql
@@ -21,7 +21,7 @@ query getLibraryItemsPreview($language_code: String) {
price {
...pricePicker
}
- categories {
+ categories(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -47,7 +47,7 @@ query getLibraryItemsPreview($language_code: String) {
}
}
... on ComponentMetadataGame {
- platforms {
+ platforms(pagination: { limit: -1 }) {
data {
id
attributes {
diff --git a/src/graphql/operations/getPost.graphql b/src/graphql/operations/getPost.graphql
index 89b5066..7bd861a 100644
--- a/src/graphql/operations/getPost.graphql
+++ b/src/graphql/operations/getPost.graphql
@@ -8,7 +8,7 @@ query getPost($slug: String, $language_code: String) {
date {
...datePicker
}
- authors {
+ authors(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -16,7 +16,7 @@ query getPost($slug: String, $language_code: String) {
}
}
}
- categories {
+ categories(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -33,7 +33,7 @@ query getPost($slug: String, $language_code: String) {
}
}
}
- translations {
+ translations(pagination: { limit: -1 }) {
language {
data {
attributes {
diff --git a/src/graphql/operations/getPostsPreview.graphql b/src/graphql/operations/getPostsPreview.graphql
index c9db9eb..9793db7 100644
--- a/src/graphql/operations/getPostsPreview.graphql
+++ b/src/graphql/operations/getPostsPreview.graphql
@@ -7,7 +7,7 @@ query getPostsPreview {
date {
...datePicker
}
- categories {
+ categories(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -22,7 +22,7 @@ query getPostsPreview {
}
}
}
- translations {
+ translations(pagination: { limit: -1 }) {
language {
data {
attributes {
diff --git a/src/graphql/operations/getVideo.graphql b/src/graphql/operations/getVideo.graphql
index d06493d..06270a0 100644
--- a/src/graphql/operations/getVideo.graphql
+++ b/src/graphql/operations/getVideo.graphql
@@ -21,7 +21,7 @@ query getVideo($uid: String) {
}
}
}
- categories {
+ categories(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -32,7 +32,7 @@ query getVideo($uid: String) {
views
likes
source
- audio_languages {
+ audio_languages(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -40,7 +40,7 @@ query getVideo($uid: String) {
}
}
}
- sub_languages {
+ sub_languages(pagination: { limit: -1 }) {
data {
id
attributes {
diff --git a/src/graphql/operations/getVideoChannel.graphql b/src/graphql/operations/getVideoChannel.graphql
index 17e6072..b3f9cbd 100644
--- a/src/graphql/operations/getVideoChannel.graphql
+++ b/src/graphql/operations/getVideoChannel.graphql
@@ -14,7 +14,7 @@ query getVideoChannel($channel: String) {
views
duration
gone
- categories {
+ categories(pagination: { limit: -1 }) {
data {
id
attributes {
diff --git a/src/graphql/operations/getVideosPreview.graphql b/src/graphql/operations/getVideosPreview.graphql
index 5f1d4c0..9576eac 100644
--- a/src/graphql/operations/getVideosPreview.graphql
+++ b/src/graphql/operations/getVideosPreview.graphql
@@ -8,7 +8,7 @@ query getVideosPreview {
views
duration
gone
- categories {
+ categories(pagination: { limit: -1 }) {
data {
id
attributes {
diff --git a/src/graphql/operations/getWikiPage.graphql b/src/graphql/operations/getWikiPage.graphql
index b22db19..ebb945b 100644
--- a/src/graphql/operations/getWikiPage.graphql
+++ b/src/graphql/operations/getWikiPage.graphql
@@ -11,7 +11,7 @@ query getWikiPage($slug: String, $language_code: String) {
}
}
}
- categories {
+ categories(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -20,7 +20,7 @@ query getWikiPage($slug: String, $language_code: String) {
}
}
}
- tags {
+ tags(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -38,7 +38,7 @@ query getWikiPage($slug: String, $language_code: String) {
}
}
}
- translations {
+ translations(pagination: { limit: -1 }) {
title
aliases {
alias
@@ -61,7 +61,7 @@ query getWikiPage($slug: String, $language_code: String) {
}
status
body
- authors {
+ authors(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -69,7 +69,7 @@ query getWikiPage($slug: String, $language_code: String) {
}
}
}
- translators {
+ translators(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -77,7 +77,7 @@ query getWikiPage($slug: String, $language_code: String) {
}
}
}
- proofreaders {
+ proofreaders(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -87,7 +87,7 @@ query getWikiPage($slug: String, $language_code: String) {
}
}
}
- definitions {
+ definitions(pagination: { limit: -1 }) {
source {
data {
attributes {
@@ -95,7 +95,7 @@ query getWikiPage($slug: String, $language_code: String) {
}
}
}
- categories {
+ categories(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -104,7 +104,7 @@ query getWikiPage($slug: String, $language_code: String) {
}
}
}
- translations {
+ translations(pagination: { limit: -1 }) {
language {
data {
attributes {
diff --git a/src/graphql/operations/getWikiPagesPreviews.graphql b/src/graphql/operations/getWikiPagesPreviews.graphql
index 9925e99..85f142e 100644
--- a/src/graphql/operations/getWikiPagesPreviews.graphql
+++ b/src/graphql/operations/getWikiPagesPreviews.graphql
@@ -11,7 +11,7 @@ query getWikiPagesPreviews($language_code: String) {
}
}
}
- categories {
+ categories(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -20,7 +20,7 @@ query getWikiPagesPreviews($language_code: String) {
}
}
}
- tags {
+ tags(pagination: { limit: -1 }) {
data {
id
attributes {
@@ -38,9 +38,9 @@ query getWikiPagesPreviews($language_code: String) {
}
}
}
- translations {
+ translations(pagination: { limit: -1 }) {
title
- aliases {
+ aliases(pagination: { limit: -1 }) {
alias
}
summary
diff --git a/src/helpers/date.ts b/src/helpers/date.ts
new file mode 100644
index 0000000..b6fd86d
--- /dev/null
+++ b/src/helpers/date.ts
@@ -0,0 +1,10 @@
+import { DatePickerFragment } from "graphql/generated";
+
+export const compareDate = (
+ a: DatePickerFragment,
+ b: DatePickerFragment
+): number => {
+ const dateA = (a.year ?? 99999) * 365 + (a.month ?? 12) * 31 + (a.day ?? 31);
+ const dateB = (b.year ?? 99999) * 365 + (b.month ?? 12) * 31 + (b.day ?? 31);
+ return dateA - dateB;
+};
diff --git a/src/helpers/types.ts b/src/helpers/types.ts
index e164625..47b2ce3 100644
--- a/src/helpers/types.ts
+++ b/src/helpers/types.ts
@@ -1,4 +1,5 @@
import {
+ GetChronicleQuery,
GetContentTextQuery,
GetPostQuery,
GetWikiPageQuery,
@@ -37,6 +38,17 @@ export interface WikiPageWithTranslations
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
+type Chronicle = NonNullable<
+ NonNullable["data"][number]["attributes"]
+>;
+
+export interface ChronicleWithTranslations
+ extends Omit {
+ translations: NonNullable;
+}
+
+// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
+
export type RequiredNonNullable = {
[P in keyof T]-?: NonNullable;
};
diff --git a/src/helpers/types/Report.ts b/src/helpers/types/Report.ts
index 07a5816..33dd820 100644
--- a/src/helpers/types/Report.ts
+++ b/src/helpers/types/Report.ts
@@ -3,7 +3,7 @@ export type Report = {
lines: ReportLine[];
};
-export type ReportLine = {
+type ReportLine = {
subitems: string[];
name: string;
type: "Error" | "Improvement" | "Missing";
diff --git a/src/hooks/useSmartLanguage.ts b/src/hooks/useSmartLanguage.ts
index 392a7f4..9984440 100644
--- a/src/hooks/useSmartLanguage.ts
+++ b/src/hooks/useSmartLanguage.ts
@@ -7,7 +7,7 @@ import { filterDefined, isDefined } from "helpers/others";
interface Props {
items: T[];
- languages: AppStaticProps["languages"];
+ languages?: AppStaticProps["languages"];
languageExtractor: (item: NonNullable) => string | undefined;
transform?: (item: NonNullable) => NonNullable;
}
@@ -27,7 +27,7 @@ const getPreferredLanguage = (
export const useSmartLanguage = ({
items,
languageExtractor,
- languages,
+ languages = [],
transform = (item) => item,
}: Props): [
T | undefined,
diff --git a/src/pages/chronicles/[slug]/index.tsx b/src/pages/chronicles/[slug]/index.tsx
new file mode 100644
index 0000000..ed2fa36
--- /dev/null
+++ b/src/pages/chronicles/[slug]/index.tsx
@@ -0,0 +1,258 @@
+import { GetStaticProps, GetStaticPaths, GetStaticPathsResult } from "next";
+import { useCallback, useMemo } from "react";
+import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
+import { getReadySdk } from "graphql/sdk";
+import { isDefined, filterHasAttributes } from "helpers/others";
+import { ChronicleWithTranslations } from "helpers/types";
+import { AppLayout } from "components/AppLayout";
+import { useSmartLanguage } from "hooks/useSmartLanguage";
+import { ContentPanel } from "components/Panels/ContentPanel";
+import { Markdawn } from "components/Markdown/Markdawn";
+import { SubPanel } from "components/Panels/SubPanel";
+import { ThumbnailHeader } from "components/ThumbnailHeader";
+import { HorizontalLine } from "components/HorizontalLine";
+import { GetChroniclesChaptersQuery } from "graphql/generated";
+import { prettySlug } from "helpers/formatters";
+import {
+ ReturnButton,
+ ReturnButtonType,
+} from "components/PanelComponents/ReturnButton";
+import { TranslatedChroniclesList } from "components/Translated";
+import { Icon } from "components/Ico";
+
+/*
+ * ╭────────╮
+ * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
+ */
+
+interface Props extends AppStaticProps {
+ chronicle: ChronicleWithTranslations;
+ chapters: NonNullable<
+ GetChroniclesChaptersQuery["chroniclesChapters"]
+ >["data"];
+}
+
+const Chronicle = ({
+ chronicle,
+ chapters,
+ langui,
+ languages,
+ ...otherProps
+}: Props): JSX.Element => {
+ const [selectedTranslation, LanguageSwitcher, languageSwitcherProps] =
+ useSmartLanguage({
+ items: chronicle.translations,
+ languages: languages,
+ languageExtractor: useCallback(
+ (item: ChronicleWithTranslations["translations"][number]) =>
+ item?.language?.data?.attributes?.code,
+ []
+ ),
+ });
+
+ const primaryContent = useMemo<
+ NonNullable<
+ ChronicleWithTranslations["contents"]
+ >["data"][number]["attributes"]
+ >(
+ () =>
+ filterHasAttributes(chronicle.contents?.data, [
+ "attributes.translations",
+ ] as const)[0]?.attributes,
+ [chronicle.contents?.data]
+ );
+
+ const [
+ selectedContentTranslation,
+ ContentLanguageSwitcher,
+ ContentLanguageSwitcherProps,
+ ] = useSmartLanguage({
+ items: primaryContent?.translations ?? [],
+ languages: languages,
+ languageExtractor: useCallback(
+ (
+ item: NonNullable<
+ NonNullable<
+ NonNullable<
+ ChronicleWithTranslations["contents"]
+ >["data"][number]["attributes"]
+ >["translations"]
+ >[number]
+ ) => item?.language?.data?.attributes?.code,
+ []
+ ),
+ });
+
+ const contentPanel = useMemo(
+ () => (
+
+
+
+ {isDefined(selectedTranslation) ? (
+ <>
+
+ {selectedTranslation.title}
+
+
+ {languageSwitcherProps.locales.size > 1 && (
+
+ )}
+
+ {isDefined(selectedTranslation.body) && (
+
+ )}
+ >
+ ) : (
+ <>
+ {selectedContentTranslation && (
+ <>
+ 1 ? (
+
+ ) : undefined
+ }
+ categories={primaryContent?.categories}
+ type={primaryContent?.type}
+ description={selectedContentTranslation.description}
+ thumbnail={primaryContent?.thumbnail?.data?.attributes}
+ langui={langui}
+ />
+
+
+
+ {selectedContentTranslation.text_set?.text && (
+
+ )}
+ >
+ )}
+ >
+ )}
+
+ ),
+ [
+ selectedTranslation,
+ languageSwitcherProps,
+ LanguageSwitcher,
+ selectedContentTranslation,
+ ContentLanguageSwitcherProps,
+ ContentLanguageSwitcher,
+ primaryContent?.categories,
+ primaryContent?.type,
+ primaryContent?.thumbnail?.data?.attributes,
+ langui,
+ ]
+ );
+
+ const subPanel = useMemo(
+ () => (
+
+
+
+ {filterHasAttributes(chapters, [
+ "attributes.chronicles",
+ "id",
+ ] as const).map((chapter) => (
+ ({
+ title: translation.title,
+ language: translation.language.data.attributes.code,
+ }))}
+ fallback={{ title: prettySlug(chapter.attributes.slug) }}
+ currentSlug={chronicle.slug}
+ />
+ ))}
+
+
+ ),
+ [chapters, chronicle.slug, langui]
+ );
+
+ return (
+
+ );
+};
+export default Chronicle;
+
+/*
+ * ╭──────────────────────╮
+ * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
+ */
+
+export const getStaticProps: GetStaticProps = async (context) => {
+ const sdk = getReadySdk();
+ const slug =
+ context.params && isDefined(context.params.slug)
+ ? context.params.slug.toString()
+ : "";
+ const chronicle = await sdk.getChronicle({
+ language_code: context.locale ?? "en",
+ slug: slug,
+ });
+ const chronicles = await sdk.getChroniclesChapters();
+ if (
+ !chronicle.chronicles?.data[0].attributes?.translations ||
+ !chronicles.chroniclesChapters?.data
+ )
+ return { notFound: true };
+ const props: Props = {
+ ...(await getAppStaticProps(context)),
+ chronicle: chronicle.chronicles.data[0]
+ .attributes as ChronicleWithTranslations,
+ chapters: chronicles.chroniclesChapters.data,
+ };
+ return {
+ props: props,
+ };
+};
+
+// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
+
+export const getStaticPaths: GetStaticPaths = async (context) => {
+ const sdk = getReadySdk();
+ const contents = await sdk.getChroniclesSlugs();
+ const paths: GetStaticPathsResult["paths"] = [];
+ filterHasAttributes(contents.chronicles?.data, ["attributes"] as const).map(
+ (wikiPage) => {
+ context.locales?.map((local) =>
+ paths.push({
+ params: { slug: wikiPage.attributes.slug },
+ locale: local,
+ })
+ );
+ }
+ );
+ return {
+ paths,
+ fallback: "blocking",
+ };
+};
diff --git a/src/pages/chronicles/index.tsx b/src/pages/chronicles/index.tsx
index 3aaadb9..afcc5f2 100644
--- a/src/pages/chronicles/index.tsx
+++ b/src/pages/chronicles/index.tsx
@@ -5,15 +5,28 @@ import { PanelHeader } from "components/PanelComponents/PanelHeader";
import { SubPanel } from "components/Panels/SubPanel";
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { Icon } from "components/Ico";
+import { getReadySdk } from "graphql/sdk";
+import { GetChroniclesChaptersQuery } from "graphql/generated";
+import { filterHasAttributes } from "helpers/others";
+import { prettySlug } from "helpers/formatters";
+import { TranslatedChroniclesList } from "components/Translated";
/*
* ╭────────╮
* ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
*/
-interface Props extends AppStaticProps {}
+interface Props extends AppStaticProps {
+ chapters: NonNullable<
+ GetChroniclesChaptersQuery["chroniclesChapters"]
+ >["data"];
+}
-const Chronicles = ({ langui, ...otherProps }: Props): JSX.Element => {
+const Chronicles = ({
+ langui,
+ chapters,
+ ...otherProps
+}: Props): JSX.Element => {
const subPanel = useMemo(
() => (
@@ -22,9 +35,27 @@ const Chronicles = ({ langui, ...otherProps }: Props): JSX.Element => {
title={langui.chronicles}
description={langui.chronicles_description}
/>
+
+ {filterHasAttributes(chapters, [
+ "attributes.chronicles",
+ "id",
+ ] as const).map((chapter) => (
+ ({
+ title: translation.title,
+ language: translation.language.data.attributes.code,
+ }))}
+ fallback={{ title: prettySlug(chapter.attributes.slug) }}
+ />
+ ))}
+
),
- [langui]
+ [chapters, langui]
);
return (
@@ -44,8 +75,12 @@ export default Chronicles;
*/
export const getStaticProps: GetStaticProps = async (context) => {
+ const sdk = getReadySdk();
+ const chronicles = await sdk.getChroniclesChapters();
+ if (!chronicles.chroniclesChapters?.data) return { notFound: true };
const props: Props = {
...(await getAppStaticProps(context)),
+ chapters: chronicles.chroniclesChapters.data,
};
return {
props: props,
diff --git a/src/pages/contents/[slug]/index.tsx b/src/pages/contents/[slug]/index.tsx
index 4257496..8525b1a 100644
--- a/src/pages/contents/[slug]/index.tsx
+++ b/src/pages/contents/[slug]/index.tsx
@@ -355,7 +355,6 @@ const Content = ({
fallback={{
title: prettySlug(previousContent.attributes.slug),
}}
- languages={languages}
thumbnail={
previousContent.attributes.thumbnail?.data?.attributes
}
@@ -409,7 +408,6 @@ const Content = ({
language: translation.language.data.attributes.code,
}))}
fallback={{ title: nextContent.attributes.slug }}
- languages={languages}
thumbnail={nextContent.attributes.thumbnail?.data?.attributes}
thumbnailAspectRatio="3/2"
topChips={
@@ -446,7 +444,6 @@ const Content = ({
content.type,
isMobile,
languageSwitcherProps,
- languages,
langui,
nextContent?.attributes,
previousContent?.attributes,
diff --git a/src/pages/contents/index.tsx b/src/pages/contents/index.tsx
index 1d7d149..38e7ccd 100644
--- a/src/pages/contents/index.tsx
+++ b/src/pages/contents/index.tsx
@@ -142,6 +142,17 @@ const Contents = ({
[effectiveCombineRelatedContent, searchName]
);
+ const groupCountingFunction = useCallback(
+ (
+ item: SelectiveNonNullable
+ ) =>
+ item.attributes.group?.data?.attributes?.combine &&
+ effectiveCombineRelatedContent
+ ? item.attributes.group.data.attributes.contents?.data.length ?? 1
+ : 1,
+ [effectiveCombineRelatedContent]
+ );
+
const subPanel = useMemo(
() => (
@@ -246,7 +257,6 @@ const Contents = ({
language: translation.language.data.attributes.code,
}))}
fallback={{ title: prettySlug(item.attributes.slug) }}
- languages={languages}
thumbnail={item.attributes.thumbnail?.data?.attributes}
thumbnailAspectRatio="3/2"
thumbnailForceAspectRatio
@@ -273,6 +283,7 @@ const Contents = ({
)}
className="grid-cols-2 desktop:grid-cols-[repeat(auto-fill,_minmax(15rem,1fr))]"
groupingFunction={groupingFunction}
+ groupCountingFunction={groupCountingFunction}
filteringFunction={filteringFunction}
searchingTerm={searchName}
searchingBy={(item) =>
@@ -296,9 +307,9 @@ const Contents = ({
contents,
effectiveCombineRelatedContent,
filteringFunction,
+ groupCountingFunction,
groupingFunction,
keepInfoVisible,
- languages,
langui,
searchName,
]
diff --git a/src/pages/library/[slug]/scans.tsx b/src/pages/library/[slug]/scans.tsx
index f22d2b6..e03af1b 100644
--- a/src/pages/library/[slug]/scans.tsx
+++ b/src/pages/library/[slug]/scans.tsx
@@ -144,7 +144,6 @@ const LibrarySlug = ({
: undefined,
}}
border
- languages={languages}
/>
)}
>
@@ -164,7 +163,6 @@ const LibrarySlug = ({
item.thumbnail?.data?.attributes,
item.title,
itemId,
- languages,
langui,
]
);
diff --git a/src/pages/news/index.tsx b/src/pages/news/index.tsx
index 6299f3e..9954ab4 100644
--- a/src/pages/news/index.tsx
+++ b/src/pages/news/index.tsx
@@ -41,12 +41,7 @@ interface Props extends AppStaticProps {
posts: NonNullable["data"];
}
-const News = ({
- langui,
- posts,
- languages,
- ...otherProps
-}: Props): JSX.Element => {
+const News = ({ langui, posts, ...otherProps }: Props): JSX.Element => {
const hoverable = useMediaHoverable();
const [searchName, setSearchName] = useState(
DEFAULT_FILTERS_STATE.searchName
@@ -121,7 +116,6 @@ const News = ({
description: translation.excerpt,
}))}
fallback={{ title: prettySlug(post.attributes.slug) }}
- languages={languages}
thumbnail={post.attributes.thumbnail?.data?.attributes}
thumbnailAspectRatio="3/2"
thumbnailForceAspectRatio
@@ -145,7 +139,7 @@ const News = ({
/>
),
- [keepInfoVisible, languages, langui, posts, searchName]
+ [keepInfoVisible, langui, posts, searchName]
);
return (
@@ -155,7 +149,6 @@ const News = ({
contentPanel={contentPanel}
subPanelIcon={Icon.Search}
langui={langui}
- languages={languages}
{...otherProps}
/>
);
diff --git a/src/pages/wiki/chronology.tsx b/src/pages/wiki/chronology.tsx
index 54fa089..f033ad3 100644
--- a/src/pages/wiki/chronology.tsx
+++ b/src/pages/wiki/chronology.tsx
@@ -162,12 +162,8 @@ export default Chronology;
export const getStaticProps: GetStaticProps = async (context) => {
const sdk = getReadySdk();
- const chronologyItems = await sdk.getChronologyItems({
- language_code: context.locale ?? "en",
- });
- const chronologyEras = await sdk.getEras({
- language_code: context.locale ?? "en",
- });
+ const chronologyItems = await sdk.getChronologyItems();
+ const chronologyEras = await sdk.getEras();
if (!chronologyItems.chronologyItems || !chronologyEras.chronologyEras)
return { notFound: true };
const props: Props = {
diff --git a/src/pages/wiki/index.tsx b/src/pages/wiki/index.tsx
index 9d88884..aa2cf08 100644
--- a/src/pages/wiki/index.tsx
+++ b/src/pages/wiki/index.tsx
@@ -46,12 +46,7 @@ interface Props extends AppStaticProps {
pages: NonNullable["data"];
}
-const Wiki = ({
- langui,
- languages,
- pages,
- ...otherProps
-}: Props): JSX.Element => {
+const Wiki = ({ langui, pages, ...otherProps }: Props): JSX.Element => {
const hoverable = useMediaHoverable();
const [searchName, setSearchName] = useState(
@@ -188,7 +183,6 @@ const Wiki = ({
thumbnailAspectRatio={"4/3"}
thumbnailRounded
thumbnailForceAspectRatio
- languages={languages}
keepInfoVisible={keepInfoVisible}
topChips={filterHasAttributes(item.attributes.tags?.data, [
"attributes",
@@ -220,7 +214,7 @@ const Wiki = ({
/>
),
- [groupingFunction, keepInfoVisible, languages, langui, pages, searchName]
+ [groupingFunction, keepInfoVisible, langui, pages, searchName]
);
return (
@@ -229,7 +223,6 @@ const Wiki = ({
subPanel={subPanel}
contentPanel={contentPanel}
subPanelIcon={Icon.Search}
- languages={languages}
langui={langui}
{...otherProps}
/>
diff --git a/src/tailwind.css b/src/tailwind.css
index 9f19a97..e220cb9 100644
--- a/src/tailwind.css
+++ b/src/tailwind.css
@@ -119,7 +119,7 @@ mark {
}
.formatted pre > code {
- @apply block whitespace-pre;
+ @apply block whitespace-pre-line;
}
.formatted ul {