-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
73 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 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; |