-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from Callhub-Connect/end-session-lucie
Welcome, GenerateSession components
- Loading branch information
Showing
6 changed files
with
230 additions
and
9 deletions.
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
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,79 @@ | ||
import styled from 'styled-components'; | ||
import { useNavigate } from "react-router-dom"; | ||
|
||
const Container = styled.div` | ||
background-image: linear-gradient(to bottom right, #0a8e3d, #9fdb3f); | ||
background-size: contain; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
height: 100vh; | ||
`; | ||
|
||
const Logo = styled.img` | ||
height: 270px; | ||
width: 550px; | ||
`; | ||
|
||
const CodeContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
position: relative; | ||
padding: 30px 0px 30px 30px; | ||
height: 200px; | ||
width: 850px; | ||
background-color: #f8f8f8b2; | ||
border-radius: 50px; | ||
box-shadow: 0px 4px 10px #00000040; | ||
`; | ||
|
||
const Text = styled.h3` | ||
height: 25px; | ||
width: 724px; | ||
color: #000000; | ||
font-size: 40px; | ||
font-weight: 400; | ||
line-height: normal; | ||
text-align: center; | ||
position: relative; | ||
`; | ||
|
||
const Button = styled.button` | ||
height: 55px; | ||
width: 60%; | ||
background-color: #0b9f43; | ||
border-radius: 30px 30px 30px 30px; | ||
position: relative; | ||
color: white; | ||
font-family: 'League Spartan', sans-serif; | ||
font-size: x-large; | ||
border: 0px solid; | ||
cursor: pointer; | ||
&:hover { | ||
background-color: #076a2d; | ||
} | ||
` | ||
|
||
function GenerateSession() { | ||
let navigate = useNavigate(); | ||
|
||
// this is just for demo purposes, we're going to need to integrate this with specific session | ||
const routeChange = () =>{ | ||
let path = `/session`; | ||
navigate(path); | ||
} | ||
|
||
return( | ||
<Container> | ||
<Logo src="./img/callhubLogo-cropped.svg" alt="Callhub Logo" /> | ||
<CodeContainer> | ||
<Text>Employee Side</Text> | ||
<Button onClick={routeChange}>Generate Session</Button> | ||
</CodeContainer> | ||
</Container> | ||
); | ||
} | ||
|
||
export default GenerateSession; |
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,72 @@ | ||
import styled from 'styled-components'; | ||
import { useNavigate } from "react-router-dom"; | ||
|
||
const Container = styled.div` | ||
background-image: linear-gradient(to bottom right, #0a8e3d, #9fdb3f); | ||
background-size: contain; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
height: 100vh; | ||
`; | ||
|
||
const ButtonContainer = styled.div` | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: 100%; | ||
`; | ||
|
||
const Logo = styled.img` | ||
height: 270px; | ||
width: 550px; | ||
`; | ||
|
||
const Button = styled.button` | ||
height: 55px; | ||
width: 20%; | ||
background-color: #f8f8f8b2; | ||
border-radius: 30px 30px 30px 30px; | ||
position: relative; | ||
color: black; | ||
font-family: 'League Spartan', sans-serif; | ||
font-size: x-large; | ||
border: 0px solid; | ||
cursor: pointer; | ||
&:hover { | ||
background-color: white; | ||
} | ||
&:first-child { | ||
margin-right: 10px; // Add right margin to the first button | ||
} | ||
&:last-child { | ||
margin-left: 10px; // Add left margin to the last button | ||
} | ||
` | ||
|
||
function Welcome() { | ||
let navigate = useNavigate(); | ||
|
||
const routeChangeCustomer = () =>{ | ||
let path = `/enter`; | ||
navigate(path); | ||
} | ||
|
||
const routeChangeEmployee = () =>{ | ||
let path = `/generate`; | ||
navigate(path); | ||
} | ||
|
||
return( | ||
<Container> | ||
<Logo src="./img/callhubLogo-cropped.svg" alt="Callhub Logo" /> | ||
<ButtonContainer> | ||
<Button onClick={routeChangeCustomer}>Customer</Button> | ||
<Button onClick={routeChangeEmployee}>Employee</Button> | ||
</ButtonContainer > | ||
</Container> | ||
); | ||
} | ||
|
||
export default Welcome; |