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

Commit 2a9d1c2

Browse files
Merge branch 'nursoltan-s-issue-76' into bugbash
2 parents f8960de + edacc86 commit 2a9d1c2

File tree

3 files changed

+61
-11
lines changed

3 files changed

+61
-11
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: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,47 @@
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+
}
21+
22+
.sidebar-footer {
23+
margin: 0 auto;
24+
margin-bottom: 125px;
1425
}
1526
}
1627

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

0 commit comments

Comments
 (0)