Skip to content

Commit

Permalink
Merge pull request #20 from terra-money/dev/add-wallet-connection
Browse files Browse the repository at this point in the history
Dev/add wallet connection
  • Loading branch information
mwmerz authored Dec 11, 2023
2 parents 78f5c8d + e645cfc commit 708f9b3
Show file tree
Hide file tree
Showing 71 changed files with 2,735 additions and 288 deletions.
2 changes: 1 addition & 1 deletion frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/svg+xml" href="/allianceIcon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Alliance DAO NFT</title>
</head>
Expand Down
77 changes: 77 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
},
"dependencies": {
"@mdx-js/rollup": "^3.0.0",
"@tanstack/react-query": "^5.13.4",
"@tanstack/react-query-devtools": "^5.13.5",
"@terra-money/feather.js": "^1.2.1",
"@terra-money/wallet-kit": "^1.0.15",
"buffer": "^6.0.3",
Expand Down
9 changes: 9 additions & 0 deletions frontend/public/allianceIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion frontend/public/vite.svg

This file was deleted.

4 changes: 4 additions & 0 deletions frontend/src/App.module.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
html {
background: #DCD7CF;
}

.main__container {
display: flex;
flex-direction: column;
height: 100%;
min-height: 100vh;
padding-bottom: 16px;

background: linear-gradient(180deg, #F1EEE9 0%, #DCD7CF 100%);

Expand Down
33 changes: 20 additions & 13 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
import { useState } from 'react';
import classNames from 'classnames/bind';
import Navigation from './components/navigations/Navigation';
import { useNav } from './config/routes';
import styles from './App.module.scss';
import { useState } from "react"
import classNames from "classnames/bind"
import Navigation from "./components/navigations/Navigation"
import { useNav } from "./config/routes"
import styles from "./App.module.scss"

const cx = classNames.bind(styles);
const cx = classNames.bind(styles)

const App = () => {
const { element: routes } = useNav();
const [isMobileNavOpen, setMobileNavOpen] = useState(false);
const { element: routes } = useNav()
const [isMobileNavOpen, setMobileNavOpen] = useState(false)

return (
<div className={cx(styles.main__container, { [styles.mobile__nav__open]: isMobileNavOpen })}>
<Navigation isMobileNavOpen={isMobileNavOpen} setMobileNavOpen={setMobileNavOpen} />
<div
className={cx(styles.main__container, {
[styles.mobile__nav__open]: isMobileNavOpen,
})}
>
<Navigation
isMobileNavOpen={isMobileNavOpen}
setMobileNavOpen={setMobileNavOpen}
/>
{routes}
</div>
);
};
)
}

export default App;
export default App
5 changes: 5 additions & 0 deletions frontend/src/assets/CircleClear.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions frontend/src/assets/DropdownArrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions frontend/src/assets/ExternalLink.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions frontend/src/assets/Filter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions frontend/src/assets/Search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions frontend/src/assets/socials/Medium.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions frontend/src/assets/socials/Telegram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions frontend/src/assets/socials/Twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions frontend/src/components/Connect.module.scss

This file was deleted.

9 changes: 0 additions & 9 deletions frontend/src/components/Connect.tsx

This file was deleted.

58 changes: 58 additions & 0 deletions frontend/src/components/checkbox/checkbox.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// @import 'scss/font_mixins';

.checkbox {
display: inline-flex;
justify-content: center;
align-items: center;

cursor: pointer;
gap: 8px;
user-select: none;

&.checked .indicator {
opacity: 1;
}

&.disabled {
cursor: not-allowed;
opacity: 0.5;
}

.text {
flex: 1;
// @include Small;
color: var(--token-dark-500);
}

&.checked {
.track {
border: solid 1px var(--token-primary-400);
}

.text {
color: var(--token-light-white);
transition: color 100ms;
}
}
}

.track {
display: flex;
justify-content: center;
align-items: center;

border: solid 1px var(--token-dark-500);
border-radius: 6px;
width: 18px;
height: 18px;
}

.indicator {
background: var(--token-primary-500);
border-radius: 2px;
width: 8px;
height: 8px;

opacity: 0;
transition: opacity 100ms;
}
30 changes: 30 additions & 0 deletions frontend/src/components/checkbox/checkbox.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { ForwardedRef, forwardRef, InputHTMLAttributes } from 'react';
import classNames from 'classnames/bind';
import styles from './checkbox.module.scss';

const cx = classNames.bind(styles);

export interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement> {
label: string
checked?: boolean
}

const Checkbox = forwardRef(
(
{ className, label, checked, ...attrs }: CheckboxProps,
ref: ForwardedRef<HTMLInputElement>
) => {
const { disabled } = attrs;
return (
<label className={cx(styles.checkbox, { checked, disabled }, className)}>
<input {...attrs} type='checkbox' hidden ref={ref} />
<span className={styles.track}>
<span className={styles.indicator} />
</span>
<span className={styles.text}>{label}</span>
</label>
);
},
);

export default Checkbox;
Loading

0 comments on commit 708f9b3

Please sign in to comment.