Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/atlantabitdevs/familybtc in…
Browse files Browse the repository at this point in the history
…to feature/nodes
  • Loading branch information
Jordan Brookman authored and Jordan Brookman committed May 7, 2022
2 parents 03b1d52 + 4eff973 commit 6416900
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 6 deletions.
2 changes: 2 additions & 0 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import React from 'react';
import {ContactsIcon, CrossIcon, GearIcon, MenuIcon} from '@bitcoin-design/bitcoin-icons-react/filled';
import {ChartSquareBarIcon} from '@heroicons/react/solid';
import NewFamily from './routes/NewFamily';
import Invite from './routes/Invite';

const Child = {};

Expand Down Expand Up @@ -56,6 +57,7 @@ function App() {

<Routes>
<Route path="onboarding" element={<Onboarding />} />
<Route path="invite" element={<Invite />} />
<Route path="new-family" element={<NewFamily />} />
<Route path="/" element={<Home />}>
<Route path="family" element={<Family />}>
Expand Down
13 changes: 13 additions & 0 deletions frontend/src/components/InputText.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const InputText = ({placeholder, value, type, onChange}) => {
return (
<input
type={type ? type : 'text'}
className="w-full p-4 rounded-md font-light text-lg text-black"
placeholder={placeholder}
value={value}
onChange={onChange}
/>
)
}

export default InputText;
6 changes: 5 additions & 1 deletion frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}

.default-bg {
@apply fixed h-screen w-screen;
@apply fixed h-screen w-screen z-0;
opacity: 0.10;
filter: blur(8px);
background-image: url('../public/pebbles.jpg');
Expand All @@ -19,4 +19,8 @@

h1, h2 {
@apply font-display;
}

.tile {
@apply rounded-lg bg-fam-bg-dark p-8 drop-shadow-lg my-4 border border-fam-teal border-solid space-y-4 flex flex-col;
}
21 changes: 17 additions & 4 deletions frontend/src/routes/Home.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
import React from "react";
import { Link, Outlet } from "react-router-dom";
import Button from '../components/Button';
import {PlusIcon} from '@heroicons/react/solid';

const Home = () => {
return (
<div className="min-h-screen">
<div className="default-bg"></div>
<div className="min-w-screen min-h-screen p-8 flex flex-col justify-center">
<div className="min-w-screen min-h-screen p-8 flex flex-col justify-center z-10 relative">
<h1 className="text-2xl">Welcome, Jerry</h1>

<div className="rounded-md bg-fam-bg-dark p-8">
<h2>Balance</h2>
<p>1000 <span>sats</span></p>
<div className="rounded-lg bg-fam-bg-dark p-8 drop-shadow-lg my-4 border border-fam-teal border-solid">
<h2 className="mb-4">Your Balance</h2>
<p className="text-4xl">1000 <span>sats</span></p>
</div>

<div className="rounded-lg bg-fam-bg-dark p-8 drop-shadow-lg my-4 border border-fam-teal border-solid space-y-4 flex flex-col">
<h2>Members</h2>

<p className="text-lg">Your tribe has no members. Add&nbsp;one! </p>

<Link to="/invite">
<Button><PlusIcon className="w-8 h-8" /> <span>Add Member</span></Button>
</Link>
</div>

</div>
<Outlet />
</div>
Expand Down
53 changes: 53 additions & 0 deletions frontend/src/routes/Invite.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import React from "react";
import { Link } from "react-router-dom";
import Button from '../components/Button';
import {MailIcon, PlusIcon} from '@heroicons/react/solid';
import InputText from '../components/InputText';

const Invite = () => {
const [invited, setInvited] = React.useState(false)
const [invitedEmail, setInvitedEmail] = React.useState('')

return (
<div className="min-h-screen">
<div className="default-bg"></div>
<div className="min-w-screen min-h-screen p-8 flex flex-col justify-center z-10 relative">
{!invited ?
<div className="tile">
<h2>Invite Members</h2>

<p className="text-lg">Your tribe has no members. Add&nbsp;one! </p>

<InputText
type="email"
placeholder="[email protected]"
value={invitedEmail}
onChange={ (e)=>{setInvitedEmail(e.target.value)} }
/>

<Button onClick={() => setInvited(true)}>
<MailIcon className="w-8 h-8"/> <span>Invite Member</span>
</Button>
</div>
:
<div className="tile">
<h2>Invite Members</h2>

<p className="text-lg">
<strong>{invitedEmail}</strong> has been invited! Would you like to add another member?
</p>

<Button onClick={()=>{setInvited(false); setInvitedEmail('');}}>
<PlusIcon className="w-8 h-8" /> <span>Invite Another</span>
</Button>
<Link to="/">
<Button style="free">Return to Dashboard</Button>
</Link>
</div>
}
</div>
</div>
);
};

export default Invite;
3 changes: 2 additions & 1 deletion frontend/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ module.exports = {
colors: {
'fam-orange': '#ff9500',
'fam-orange-inactive': '#A68659',
'fam-bg-dark': '#3B474B'
'fam-bg-dark': '#3B474B',
'fam-teal': '#56737D'
},
backgroundImage: {
'mountains': "url('../public/mountains.jpg')",
Expand Down

0 comments on commit 6416900

Please sign in to comment.