move a bunch of files around
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
import React from 'react';
|
||||
|
||||
import System from './System.js'
|
||||
import Memberlist from './Memberlist.js'
|
||||
|
||||
export default function Dash(props) {
|
||||
|
||||
return (<>
|
||||
<System />
|
||||
<Memberlist />
|
||||
</>
|
||||
);
|
||||
}
|
@@ -1,28 +0,0 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import * as BS from 'react-bootstrap';
|
||||
import { useParams } from "react-router-dom";
|
||||
import MemberPage from './MemberPage.js'
|
||||
|
||||
export default function MemberPages(props) {
|
||||
const { memberID } = useParams();
|
||||
|
||||
|
||||
const memberpages = props.members.filter((member) => member.id === memberID)
|
||||
const memberpage = memberpages.map((member) => <MemberPage key={member.id} member={member} edit={props.edit}/>)
|
||||
const noMatch = memberpages.length === 0;
|
||||
|
||||
useEffect (() => {
|
||||
if (memberpages.length === 0) {
|
||||
}
|
||||
}, [memberpages])
|
||||
|
||||
if (noMatch) return (
|
||||
<BS.Alert variant="danger">You do not have a member with the ID '{memberID}' in your system. Please check the ID again.</BS.Alert>
|
||||
)
|
||||
|
||||
return (
|
||||
<>
|
||||
{memberpage}
|
||||
</>
|
||||
)
|
||||
}
|
@@ -9,9 +9,9 @@ import autosize from 'autosize';
|
||||
import LazyLoad from 'react-lazyload';
|
||||
import Twemoji from 'react-twemoji';
|
||||
|
||||
import API_URL from "../Constants/constants.js";
|
||||
import API_URL from "../../Constants/constants.js";
|
||||
|
||||
import defaultAvatar from '../default_discord_avatar.png'
|
||||
import defaultAvatar from '../../default_discord_avatar.png'
|
||||
import { FaLink, FaLock, FaTrashAlt } from "react-icons/fa";
|
||||
|
||||
export default function MemberCard(props) {
|
||||
@@ -69,7 +69,7 @@ export default function MemberCard(props) {
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
const { toHTML } = require('../Functions/discord-parser.js');
|
||||
const { toHTML } = require('../../Functions/discord-parser.js');
|
||||
|
||||
if (member.display_name) {
|
||||
setDisplayName(member.display_name)
|
@@ -8,10 +8,10 @@ import 'reactjs-popup/dist/index.css';
|
||||
import autosize from 'autosize';
|
||||
import Twemoji from 'react-twemoji';
|
||||
|
||||
import API_URL from "../Constants/constants.js";
|
||||
import history from "../History.js";
|
||||
import API_URL from "../../Constants/constants.js";
|
||||
import history from "../../History.js";
|
||||
|
||||
import defaultAvatar from '../default_discord_avatar.png'
|
||||
import defaultAvatar from '../../default_discord_avatar.png'
|
||||
import { FaLink, FaLock, FaTrashAlt } from "react-icons/fa";
|
||||
|
||||
export default function MemberPage(props) {
|
||||
@@ -69,7 +69,7 @@ export default function MemberPage(props) {
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
const { toHTML } = require('../Functions/discord-parser.js');
|
||||
const { toHTML } = require('../../Functions/discord-parser.js');
|
||||
|
||||
if (member.display_name) {
|
||||
setDisplayName(member.display_name)
|
@@ -6,9 +6,9 @@ import 'reactjs-popup/dist/index.css';
|
||||
import { useForm } from "react-hook-form";
|
||||
|
||||
import MemberCard from './MemberCard.js'
|
||||
import MemberPages from './MemberPages.js'
|
||||
import Loading from "./Loading.js";
|
||||
import API_URL from "../Constants/constants.js";
|
||||
import MemberPages from '../../Pages/MemberPages.js'
|
||||
import Loading from "../Loading.js";
|
||||
import API_URL from "../../Constants/constants.js";
|
||||
|
||||
import { FaPlus } from "react-icons/fa";
|
||||
|
@@ -8,10 +8,10 @@ import 'moment-timezone';
|
||||
import Popup from 'reactjs-popup';
|
||||
import Twemoji from 'react-twemoji';
|
||||
|
||||
import API_URL from "../Constants/constants.js";
|
||||
import API_URL from "../../Constants/constants.js";
|
||||
|
||||
import history from "../History.js";
|
||||
import defaultAvatar from '../default_discord_avatar.png'
|
||||
import history from "../../History.js";
|
||||
import defaultAvatar from '../../default_discord_avatar.png'
|
||||
import { FaAddressCard } from "react-icons/fa";
|
||||
|
||||
export default function System(props) {
|
||||
@@ -47,7 +47,7 @@ export default function System(props) {
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
const { toHTML } = require('../Functions/discord-parser.js');
|
||||
const { toHTML } = require('../../Functions/discord-parser.js');
|
||||
|
||||
if (user.name) {
|
||||
setName(user.name);
|
@@ -1,27 +0,0 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import * as BS from 'react-bootstrap';
|
||||
import { useParams } from "react-router-dom";
|
||||
import ProfilePage from './ProfilePage.js'
|
||||
|
||||
export default function MemberPages(props) {
|
||||
const { memberID } = useParams();
|
||||
|
||||
const memberpages = props.members.filter((member) => member.id === memberID)
|
||||
const memberpage = memberpages.map((member) => <ProfilePage key={member.id} member={member}/>)
|
||||
const noMatch = memberpages.length === 0;
|
||||
|
||||
useEffect (() => {
|
||||
if (memberpages.length === 0) {
|
||||
}
|
||||
}, [memberpages])
|
||||
|
||||
if (noMatch) return (
|
||||
<BS.Alert variant="danger">This system does not have a member with the ID '{memberID}', or the member's visibility is set to private.</BS.Alert>
|
||||
)
|
||||
|
||||
return (
|
||||
<>
|
||||
{memberpage}
|
||||
</>
|
||||
)
|
||||
}
|
@@ -1,47 +0,0 @@
|
||||
import React from 'react';
|
||||
import * as BS from 'react-bootstrap';
|
||||
import { FaStar } from "react-icons/fa";
|
||||
import { useForm } from "react-hook-form";
|
||||
import history from "../History.js";
|
||||
import { Switch, Route, useRouteMatch } from 'react-router-dom';
|
||||
import Profile from './Profile.js'
|
||||
|
||||
export default function Public () {
|
||||
const { path, url } = useRouteMatch();
|
||||
const { register, handleSubmit } = useForm();
|
||||
|
||||
const submitID = (data) => {
|
||||
history.push(`${url}/${data.sysID}`);
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
<Switch>
|
||||
<Route exact path={path}>
|
||||
<BS.Card>
|
||||
<BS.Card.Header>
|
||||
<BS.Card.Title><FaStar className="mr-3" />Profile</BS.Card.Title>
|
||||
</BS.Card.Header>
|
||||
<BS.Card.Body>
|
||||
<BS.Form onSubmit={handleSubmit(submitID)}>
|
||||
<BS.Form.Label>
|
||||
Submit a system ID to view to that system's profile.
|
||||
</BS.Form.Label>
|
||||
<BS.Form.Row>
|
||||
<BS.Col className="mb-1" xs={12} lg={10}>
|
||||
<BS.Form.Control name="sysID" {...register("sysID")} defaultValue="" />
|
||||
</BS.Col>
|
||||
<BS.Col>
|
||||
<BS.Button variant="primary" type="submit" block >Submit</BS.Button>
|
||||
</BS.Col>
|
||||
</BS.Form.Row>
|
||||
</BS.Form>
|
||||
</BS.Card.Body>
|
||||
</BS.Card>
|
||||
</Route>
|
||||
<Route path={`${path}/:sysID`}>
|
||||
<Profile />
|
||||
</Route>
|
||||
</Switch>
|
||||
)
|
||||
}
|
@@ -6,9 +6,9 @@ import Popup from 'reactjs-popup';
|
||||
import Twemoji from 'react-twemoji';
|
||||
|
||||
import { FaAddressCard } from "react-icons/fa";
|
||||
import defaultAvatar from '../default_discord_avatar.png'
|
||||
import Loading from "./Loading.js";
|
||||
import API_URL from "../Constants/constants.js";
|
||||
import defaultAvatar from '../../default_discord_avatar.png'
|
||||
import Loading from "../Loading.js";
|
||||
import API_URL from "../../Constants/constants.js";
|
||||
import ProfileList from "./ProfileList.js";
|
||||
|
||||
export default function Profile () {
|
||||
@@ -42,7 +42,7 @@ export default function Profile () {
|
||||
}, [sysID])
|
||||
|
||||
useEffect(() => {
|
||||
const { toHTML } = require('../Functions/discord-parser.js');
|
||||
const { toHTML } = require('../../Functions/discord-parser.js');
|
||||
|
||||
if (system.name) {
|
||||
setName(system.name);
|
@@ -8,7 +8,7 @@ import autosize from 'autosize';
|
||||
import LazyLoad from 'react-lazyload';
|
||||
import Twemoji from 'react-twemoji';
|
||||
|
||||
import defaultAvatar from '../default_discord_avatar.png'
|
||||
import defaultAvatar from '../../default_discord_avatar.png'
|
||||
import { FaLink } from "react-icons/fa";
|
||||
|
||||
export default function MemberCard(props) {
|
||||
@@ -30,7 +30,7 @@ export default function MemberCard(props) {
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
const { toHTML } = require('../Functions/discord-parser.js');
|
||||
const { toHTML } = require('../../Functions/discord-parser.js');
|
||||
|
||||
if (member.display_name) {
|
||||
setDisplayName(member.display_name)
|
@@ -4,9 +4,9 @@ import * as BS from 'react-bootstrap'
|
||||
import 'reactjs-popup/dist/index.css';
|
||||
|
||||
import ProfileCard from './ProfileCard.js'
|
||||
import ProfilePages from './ProfilePages.js'
|
||||
import Loading from "./Loading.js";
|
||||
import API_URL from "../Constants/constants.js";
|
||||
import ProfilePages from '../../Pages/ProfilePages.js'
|
||||
import Loading from "../Loading.js";
|
||||
import API_URL from "../../Constants/constants.js";
|
||||
|
||||
export default function Memberlist() {
|
||||
|
@@ -7,7 +7,7 @@ import 'reactjs-popup/dist/index.css';
|
||||
import autosize from 'autosize';
|
||||
import Twemoji from 'react-twemoji';
|
||||
|
||||
import defaultAvatar from '../default_discord_avatar.png'
|
||||
import defaultAvatar from '../../default_discord_avatar.png'
|
||||
import { FaLink } from "react-icons/fa";
|
||||
|
||||
export default function ProfilePage(props) {
|
||||
@@ -30,7 +30,7 @@ export default function ProfilePage(props) {
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
const { toHTML } = require('../Functions/discord-parser.js');
|
||||
const { toHTML } = require('../../Functions/discord-parser.js');
|
||||
|
||||
if (member.display_name) {
|
||||
setDisplayName(member.display_name)
|
Reference in New Issue
Block a user