From 56c25bb7f643e961668039d4a5a5fe59f058a79e Mon Sep 17 00:00:00 2001
From: q9i <46249765+quantum9Innovation@users.noreply.github.com>
Date: Thu, 15 Feb 2024 21:09:45 -0800
Subject: [PATCH] Dark magic refactor
---
src/app/author/[author]/AuthorDisplay.tsx | 27 ---------
src/app/author/[author]/KonamiSnowfall.tsx | 57 ++++++++++++++-----
.../document/view/[slug]/VersionChooser.tsx | 4 +-
src/app/globals.css | 4 +-
4 files changed, 46 insertions(+), 46 deletions(-)
diff --git a/src/app/author/[author]/AuthorDisplay.tsx b/src/app/author/[author]/AuthorDisplay.tsx
index 7fde590..4b59aab 100644
--- a/src/app/author/[author]/AuthorDisplay.tsx
+++ b/src/app/author/[author]/AuthorDisplay.tsx
@@ -112,23 +112,6 @@ export default function AuthorDisplay({
)
}
- const NationalityDisplay = ({
- nationality,
- }: Readonly<{ nationality: string }>) => {
- const nationalityData = nationalities[nationality]
- const { demonym, flag } = nationalityData
- return (
-
-
-
{demonym}
-
- )
- }
-
const Bio = () => {
const { bio } = data
if (!bio) return null
@@ -172,16 +155,6 @@ export default function AuthorDisplay({
-
- Ethnicity and Nationality
-
-
- {nationality.map((n: string) => (
-
-
-
- ))}
-
{authorsDocuments.length > 0 && (
<>
diff --git a/src/app/author/[author]/KonamiSnowfall.tsx b/src/app/author/[author]/KonamiSnowfall.tsx
index b96dc6b..bc787a7 100644
--- a/src/app/author/[author]/KonamiSnowfall.tsx
+++ b/src/app/author/[author]/KonamiSnowfall.tsx
@@ -3,6 +3,7 @@ import Konami from 'react-konami-code'
import { Snowfall } from 'react-snowfall'
import { useEffect, useState } from 'react'
import { nationalities } from '@/app/db/data'
+import { Fragment } from 'react'
export default function KonamiSnowfall({
nationalityList,
@@ -25,26 +26,52 @@ export default function KonamiSnowfall({
imagesTemp.push(image)
})
setImages(imagesTemp)
- }, [])
+ }, [nationalityList])
+
+ const NationalityDisplay = ({
+ nationality,
+ }: Readonly<{ nationality: string }>) => {
+ const nationalityData = nationalities[nationality]
+ const { demonym, flag } = nationalityData
+ return (
+
+
+
{demonym}
+
+ )
+ }
return (
<>
{snowfallActivated && (
-
+
+
+ {nationalityList.map((n: string) => (
+
+
+
+ ))}
+
+
+
)}
>
)
diff --git a/src/app/document/view/[slug]/VersionChooser.tsx b/src/app/document/view/[slug]/VersionChooser.tsx
index c9a69b6..26e1254 100644
--- a/src/app/document/view/[slug]/VersionChooser.tsx
+++ b/src/app/document/view/[slug]/VersionChooser.tsx
@@ -73,13 +73,13 @@ const VersionChooser = ({