profile wip

This commit is contained in:
Brandon Thomas committed 2021-06-04 02:52:00 -04:00
1 parent ef3198d390
commit 6c71fa8d65
2 files changed
+35 -2

No files matched your search

+6 -2
View File
@@ -12,7 +12,8 @@ function NewTopNavFc(props: Props) {
if (props.sessionWrapper.isLoggedIn()) {
let username = props.sessionWrapper.getUsername();
myDataLink = `/profile/${username}/data`;
//myDataLink = `/profile/${username}/data`;
myDataLink = `/profile/${username}`;
}
return (
@@ -34,9 +35,12 @@ function NewTopNavFc(props: Props) {
>Upload</Link>
</div>
<div className="column">
{/*<Link to={myDataLink}
className="button is-link is-medium is-inverted"
>Pending</Link>*/}
<Link to={myDataLink}
className="button is-link is-medium is-inverted"
>Pending</Link>
>My Data</Link>
</div>
<div className="column">
<Link to="/firehose"
+29
View File
@@ -8,6 +8,7 @@ import { ProfileW2lInferenceResultsListFc } from './Profile_W2lInferenceResultLi
import { ProfileW2lTemplateListFc } from './Profile_W2lTemplateListFc';
import { SessionWrapper } from '../../session/SessionWrapper';
import { useParams } from 'react-router-dom';
import { profile } from 'console';
interface Props {
sessionWrapper: SessionWrapper,
@@ -79,6 +80,26 @@ function ProfileFc(props: Props) {
let editLinkUrl = `/profile/${username}/edit`;
let profileRows : Array<JSX.Element> = [];
if (userData !== undefined && userData.twitch_username) {
profileRows.push(
<tr key="twitch">
<th>Twitch</th>
<td>{userData.twitch_username}</td>
</tr>
)
}
if (userData !== undefined && userData.twitter_username) {
profileRows.push(
<tr key="twitter">
<th>Twitter</th>
<td>{userData.twitter_username}</td>
</tr>
)
}
return (
<div>
<h1 className="title is-1">
@@ -96,6 +117,14 @@ function ProfileFc(props: Props) {
<p>Profiles are a work in progress.</p>
<br />
<table className="table">
<tbody>
{profileRows}
</tbody>
</table>
<br />
<br />