Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 9bbe3b3

Browse files
author
tc_user
committed
fix issue 76
1 parent f8960de commit 9bbe3b3

File tree

3 files changed

+62
-13
lines changed

3 files changed

+62
-13
lines changed

src/App.jsx

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
* Main App component
33
*/
44
import React, { useState, useLayoutEffect, useEffect, useRef } from "react";
5-
import { Router, useLocation } from "@reach/router";
5+
import { Router, useLocation, redirectTo } from "@reach/router";
66
import Challenges from "./containers/Challenges";
77
import Filter from "./containers/Filter";
88
import Menu from "./components/Menu";
99
import { disableSidebarForRoute } from "@topcoder/micro-frontends-navbar-app";
10-
import NoSidebarDemo from "./components/NoSidebarDemo";
10+
import Button from "./components/Button";
1111
import * as constants from "./constants";
1212
import actions from "./actions";
1313
import * as utils from "./utils";
@@ -84,9 +84,20 @@ const App = () => {
8484
return (
8585
<div className="layout">
8686
<aside className="sidebar">
87-
{menu}
88-
<hr />
89-
<Filter />
87+
<div className="sidebar-content">
88+
{menu}
89+
<hr />
90+
<Filter />
91+
</div>
92+
<div className="sidebar-footer">
93+
<a
94+
className="button button-primary"
95+
href="https://github.com/topcoder-platform/micro-frontends-earn-app/issues/new"
96+
target="_blank"
97+
>
98+
GIVE APPLICATION FEEDBACK
99+
</a>
100+
</div>
90101
</aside>
91102
<div className="content">
92103
<Router>

src/components/Button/index.jsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,23 @@ import PT from "prop-types";
33

44
import "./styles.scss";
55

6-
const Button = ({ children, onClick }) => (
7-
<button styleName="button" onClick={onClick}>
6+
const Button = ({ children, onClick, primary }) => (
7+
<button
8+
styleName={`${primary ? "button button-primary" : "button"}`}
9+
onClick={onClick}
10+
>
811
{children}
912
</button>
1013
);
1114

15+
Button.defaultProps = {
16+
primary: false,
17+
};
18+
1219
Button.propTypes = {
1320
children: PT.node,
1421
onClick: PT.func,
22+
primary: PT.bool,
1523
};
1624

1725
export default Button;

src/styles/_utils.scss

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,46 @@
66
flex: 0 0 270px;
77
min-height: calc(100vh - 60px);
88
background: $white;
9+
display: flex;
10+
flex-direction: column;
11+
justify-content: space-between;
912

10-
> hr {
11-
margin: 0 20px;
12-
border-color: $tc-gray-05;
13-
opacity: 0.5;
13+
.sidebar-content {
14+
> hr {
15+
margin: 0 20px;
16+
border-color: $tc-gray-05;
17+
opacity: 0.5;
18+
}
19+
20+
.content {
21+
flex: 1 1 auto;
22+
}
23+
}
24+
25+
.sidebar-footer {
26+
margin: 0 auto;
27+
margin-bottom: 125px;
1428
}
1529
}
1630

17-
.content {
18-
flex: 1 1 auto;
31+
.button {
32+
@include roboto-bold;
33+
34+
padding: 8px 12px;
35+
font-size: $font-size-xs;
36+
color: $green;
37+
line-height: 1;
38+
letter-spacing: 0.8px;
39+
white-space: nowrap;
40+
appearance: none;
41+
background: $white;
42+
border: 1px solid $green;
43+
border-radius: 15px;
44+
}
45+
46+
.button-primary {
47+
color: $white;
48+
background-color: $green;
1949
}
2050
}
2151
}

0 commit comments

Comments
 (0)