Joystream Stats 3 years ago
parent
commit
e0c69e6a07
4 changed files with 14 additions and 15 deletions
  1. 1 6
      src/App.tsx
  2. 11 6
      src/components/Dashboard/Footer.tsx
  3. 1 1
      src/components/Proposals/Row.tsx
  4. 1 2
      src/index.css

+ 1 - 6
src/App.tsx

@@ -15,7 +15,6 @@ import { Header } from "@polkadot/types/interfaces";
 interface IProps {}
 interface IProps {}
 
 
 const version = 6;
 const version = 6;
-const userLink = `${domain}/#/members/joystreamstats`;
 
 
 const initialState = {
 const initialState = {
   assets: [],
   assets: [],
@@ -511,11 +510,7 @@ class App extends React.Component<IProps, IState> {
 
 
         <Modals toggleShowStatus={this.toggleShowStatus} {...this.state} />
         <Modals toggleShowStatus={this.toggleShowStatus} {...this.state} />
 
 
-        <Footer
-          show={!hideFooter}
-          toggleHide={this.toggleFooter}
-          link={userLink}
-        />
+        <Footer show={!hideFooter} toggleHide={this.toggleFooter} />
 
 
         <Status
         <Status
           toggleShowStatus={this.toggleShowStatus}
           toggleShowStatus={this.toggleShowStatus}

+ 11 - 6
src/components/Dashboard/Footer.tsx

@@ -1,5 +1,10 @@
 import React from "react";
 import React from "react";
+import { Link } from "@material-ui/core";
 import { X, Info } from "react-feather";
 import { X, Info } from "react-feather";
+import { domain } from "../../config";
+
+const donationUrl = `${domain}/#/members/joystreamstats`;
+const ideasUrl = `${domain}/#/forum/threads/257`;
 
 
 const Footer = (props: {
 const Footer = (props: {
   show: boolean;
   show: boolean;
@@ -12,16 +17,16 @@ const Footer = (props: {
       <Info className="footer-hidden" onClick={() => props.toggleHide()} />
       <Info className="footer-hidden" onClick={() => props.toggleHide()} />
     );
     );
   return (
   return (
-    <div className="w-100 footer text-light">
+    <div className="footer">
       <X className="footer-hidden" onClick={() => props.toggleHide()} />
       <X className="footer-hidden" onClick={() => props.toggleHide()} />
       If you find this place useful, please consider to{" "}
       If you find this place useful, please consider to{" "}
-      <a className="mx-1 text-light" href={link}>
-        <u>send some tokens</u>
-      </a>
+      <Link className="mx-1" href={donationUrl}>
+        <u>donate some tokens</u>
+      </Link>
       or a
       or a
-      <a className="mx-1 text-light" href="/forum/threads/257">
+      <Link className="mx-1" href={ideasUrl}>
         <u>message with ideas</u>
         <u>message with ideas</u>
-      </a>{" "}
+      </Link>{" "}
       to make it even better.
       to make it even better.
     </div>
     </div>
   );
   );

+ 1 - 1
src/components/Proposals/Row.tsx

@@ -101,7 +101,7 @@ const ProposalRow = (props: {
   const left = `${period - blocks} / ${period} blocks left (${percent}%)`;
   const left = `${period - blocks} / ${period} blocks left (${percent}%)`;
   const classes = useStyles();
   const classes = useStyles();
 
 
-  const hasToVote = council?.consuls.filter(
+  const hasToVote = council?.consuls?.filter(
     (c) => !votes.find((v) => v.member.handle === c.member.handle)
     (c) => !votes.find((v) => v.member.handle === c.member.handle)
   );
   );
 
 

+ 1 - 2
src/index.css

@@ -275,9 +275,8 @@ table td {
   left: 0px;
   left: 0px;
 }
 }
 .footer {
 .footer {
-  background: black;
   text-align: center;
   text-align: center;
-  position: fixed;
+  posoition: fixed;
   bottom: 0px;
   bottom: 0px;
   padding: 5px;
   padding: 5px;
   width: 100%;
   width: 100%;