diff --git a/data/administracja.json b/data/administracja.json index 50ccfcb..3959246 100644 --- a/data/administracja.json +++ b/data/administracja.json @@ -2,7 +2,24 @@ { "name": "jamesen", "desc": "Frontendowiec nie jebany.", - "img": "https://pbs.twimg.com/profile_images/1605591811921149953/Ogr8ALPa_400x400.jpg" + "img": "https://pbs.twimg.com/profile_images/1605591811921149953/Ogr8ALPa_400x400.jpg", + "profile": { + "bigdesc": [ + "Tutaj można napisać w kit dużo tekstu o sobie i generalnie to będzie on wyrenderowany na stronce.", + "Tak to ma działać, generalnie. Tak. Owszem.", + "", + "Aaaaaaaaaaaaaaaaaa.", + "Jakby ktoś się zastanawiał jak zrobić takiego breaka jak tu:", + "", + "To zrobiłem żeby się tworzył przy pustym stringu w arrayu opisowym.", + "", + "ale jestem dobry, ty.", + "", + "", + "", + "~jamesen" + ] + } }, { "name": "Mollin", diff --git a/data/links.json b/data/links.json index 94707d0..6b9b896 100644 --- a/data/links.json +++ b/data/links.json @@ -23,6 +23,10 @@ "hrefalias": ["/github", "/gh"], "desc": "Nasz org na GitHubie!" }, + { + "href": "/o-gractwie#sklad-administracji", + "hrefalias": ["/profile"] + }, { "name": "Kod Źródłowy", "href": "https://github.com/gractwo/gractwo-web", diff --git a/pages/profile/[profname]/index.tsx b/pages/profile/[profname]/index.tsx new file mode 100644 index 0000000..21f684d --- /dev/null +++ b/pages/profile/[profname]/index.tsx @@ -0,0 +1,72 @@ +import { useRouter } from "next/router"; +import administracja from "../../../data/administracja.json"; + +const ProfilePage = () => { + const router = useRouter(); + const profname = router.query.profname as string; + if ( + administracja + .map((el) => { + return el.name.replaceAll(" ", "-").toLocaleLowerCase(); + }) + .includes(profname) + ) { + const person = administracja.filter((wpis) => { + return wpis.name.replaceAll(" ", "-").toLocaleLowerCase() === profname; + })[0]; + return ( +
+
+ {`${person.name} +
+

{person.name}

+

{person.desc}

+
+
+ {person.profile?.bigdesc.map((el, index) => { + return

{el ||
}

; + })} +
+ ); + } else { + return ( +
+

Sorki!{" :("}

+

+ Sprawdź pisownię: + + {`/profile/${profname}`} + + nie jest poprawnym lokatorem profilu. +

+
+ ); + } +}; + +export default ProfilePage; diff --git a/pages/profile/jamesen.tsx b/pages/profile/jamesen.tsx deleted file mode 100644 index a43d3b9..0000000 --- a/pages/profile/jamesen.tsx +++ /dev/null @@ -1,5 +0,0 @@ -const ProfileJamesen = () => { - return
Hello, this is jamesen's profile page!!
; -}; - -export default ProfileJamesen;