started work on good components for transcripts
diff --git a/pages/nucleus/transcript/index.js b/pages/nucleus/transcript/index.js
index 1c9e88f..1275e67 100644
--- a/pages/nucleus/transcript/index.js
+++ b/pages/nucleus/transcript/index.js
@@ -1,5 +1,6 @@
import Axios from 'axios';
import React from 'react';
+import Author from '../../../Components/Transcripts/Author';
function Index(props) {
return <>
@@ -13,7 +14,7 @@
paddingLeft: "25px",
color: "white",
fontSize: "1.5em",
- }}>Nucleus Transcripts</div>
+ }}>Transcript for: {props.data.for.username}#{props.data.for.discriminator} | In {<a href={`https://discord.com/channels/${props.data.guild}/${props.data.channel}`}>ChannelName</a>} | Type: {props.data.type}</div>
<div style={{
height: "100vw",
width: "100vw",
@@ -23,7 +24,13 @@
paddingTop: "10px",
transition: "all 0.3s ease-in-out"
}}>
- <p>{props.humanReadable}</p>
+ <Author author={props.data.messages[0].author} />
+ {/* {
+ props.data.messages.map((message, index) => {
+ console.log(index, message)
+ return <Author key={index.toString()} author={message.author} />
+ })
+ } */}
</div>
</>
}
@@ -40,7 +47,7 @@
}
let code;
try {
- code = await Axios.get(`http://localhost:10000/transcript/${ctx.query.code}/human`);
+ code = (await Axios.get(`http://localhost:10000/transcript/${ctx.query.code}`))
} catch (e) {
return {
redirect: {
@@ -51,7 +58,7 @@
}
return {
props: {
- humanReadable: code.data
+ data: code.data
}
}
}
\ No newline at end of file
diff --git a/pages/nucleus/transcript/testing.js b/pages/nucleus/transcript/testing.js
index ac0240b..87e9a2c 100644
--- a/pages/nucleus/transcript/testing.js
+++ b/pages/nucleus/transcript/testing.js
@@ -22,7 +22,11 @@
paddingTop: "10px",
transition: "all 0.3s ease-in-out"
}}>
- <p>{props.humanReadable}</p>
+ {
+ props.humanReadable.split("\n").map((s, i) => {
+ return <p key={i}>{s}</p>
+ })
+ }
</div>
</>
}
@@ -40,7 +44,7 @@
if (ctx.query.code === "test") {
return {
props: {
- humanReadable: "This is a test string! It should render correctly on the page"
+ humanReadable: "This is a test string! It should render correctly on the page\nAnd a newline!"
}
}
} else {