Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
709df59
Setup the chatbot with an example flow
gabriel-flynn Dec 12, 2020
3f6772a
Add SHPE logo to chatbot
gabriel-flynn Dec 12, 2020
93951b9
Merge remote-tracking branch 'origin/dev' into chatbot
gabriel-flynn Dec 12, 2020
0c900c5
Fixed cut-off message
gabriel-flynn Dec 12, 2020
67b9cb1
Merge remote-tracking branch 'origin/dev' into chatbot
gabriel-flynn Dec 19, 2020
6b5a32d
Fixed chatbot not rendering
gabriel-flynn Dec 19, 2020
8a30ebf
added theming to the chatbot (fixed the colors)
rigrergl Jan 14, 2021
3ab4557
created the tech team page (initial commit for this branch)
rigrergl Jan 23, 2021
572f96a
Merge branch 'dev' into tech-team-page
Feb 6, 2021
83ed274
created a project component. Added the Tech Officer info from Officer…
Feb 6, 2021
1927e1f
added a TechTeamProjects.json, the tech-team page then uses it to gen…
Feb 6, 2021
615eaf8
added a link to the project repos in the TechTeamProjects.json and us…
Feb 6, 2021
1617900
fixed the z-layering on the project cards
Feb 6, 2021
e2055ed
added a join the team button (will link to a google form?)
Feb 6, 2021
343fc6d
added a little description paragraph draft. Might expand everything o…
Feb 6, 2021
aa8c1ab
added the FontAwesome github icon on a button that leads to our repo
Feb 7, 2021
536fcef
added buttons (with github icon) on the TechProject component that le…
Feb 7, 2021
df10c2e
edited the image link for ResumeBook on the TechTeamProjects.json, it…
Feb 7, 2021
76f10e6
added a temporary image for the website redesign project (modified Te…
Feb 7, 2021
79c9429
fixed the project columns to only hold two cards per row and added th…
Feb 7, 2021
a5e4ba8
added <strong to some parts of the tech team description. Made the <s…
Feb 7, 2021
395efe6
added the word Repository on the button that links to project repos
Feb 7, 2021
4d95049
updated the meeting time in the tech team page
Feb 7, 2021
07b0ce0
changed the repo link (in TechTeamProjects.json) to the ones that don…
Feb 7, 2021
acb0f63
modified the project descriptions for Website-Redesign and ResumeBook
Feb 7, 2021
6bdb23a
Made the title of the projects section more prominent (centered, bigg…
Feb 7, 2021
9063ea4
removed leftover comment
Feb 7, 2021
ed969d4
ran prettier
Feb 7, 2021
29c1117
removed underline on projects title section and put all caps instead
Feb 7, 2021
9e34eac
Fixed typo in TechTeamProjects.json
rigrergl Feb 8, 2021
cc76d04
Fixed typo in tech-team.tsx
rigrergl Feb 8, 2021
51183e7
Fixed second typo in tech-team.tsx
rigrergl Feb 8, 2021
bf66311
Update pages/tech-team.tsx
rigrergl Feb 8, 2021
543375b
Put in the interest form link tech-team.tsx
rigrergl Feb 8, 2021
aaffbfa
Changed the title of the tech team page to "SHPE UTD" tech-team.tsx
rigrergl Feb 8, 2021
5944833
commiting before pulling changes from dev
Mar 16, 2021
92fb751
Merge branch 'dev' into chatbot
Mar 16, 2021
eae5e84
finishe the freshman getting involved track
Mar 16, 2021
4e09a00
merge commit
Mar 18, 2021
dfd3b6a
fleshed out the paths, now have to finish some components and change …
Mar 20, 2021
9eb84a2
added the corporate liaison officer icon at the end of the non-studen…
Mar 20, 2021
d180d01
merged with tech-team-page
Mar 20, 2021
38786eb
Merge branch 'dev' into chatbot
Apr 17, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions @types/Chatbot.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module 'react-simple-chatbot';
235 changes: 235 additions & 0 deletions components/Chatbot.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
import React from "react";
import { ThemeProvider } from "styled-components";
import ChatBot from "react-simple-chatbot";
import Link from "next/link";
import OfficerJson from "../data/Officer.json";
import OfficerIcon from "../components/OfficerIcon";
import { triggerAsyncId } from "node:async_hooks";

const theme = {
background: "#f5f8fb",
headerBgColor: "#0070c0",
headerFontColor: "#fff",
headerFontSize: "15px",
botBubbleColor: "#0070c0",
botFontColor: "#fff",
userBubbleColor: "#fff",
userFontColor: "#4a4a4a",
};

export default function App() {
const button = (label: string, link: string, newTab = false) => {
return (
<div>
{newTab ? (
<a href={link} target="_blank">
<button className="button is-primary center">{label}</button>
</a>
) : (
<Link href={link}>
<button className="button is-primary center">{label}</button>
</Link>
)}
</div>
);
};

const officerIcon = (title: string) => {
let officerName = "";
let officerEmail = "";
let imgPath = "";

OfficerJson.map((obj) => {
const { name, position, email, image } = obj;
if (position === title) {
officerName = name;
officerEmail = email;
imgPath = image;
}
});
return (
<div>
<OfficerIcon
name={officerName}
position={title}
imgPath={imgPath}
email={officerEmail}
/>
</div>
);
};

return (
<ThemeProvider theme={theme}>
<ChatBot
floating={true}
opened={true}
botAvatar="/imgs/SHPE_Logo.png"
headerTitle="SHPE UTD Chatbot"
floatingIcon="/imgs/SHPE_Logo.png"
bubbleStyle={{ maxWidth: "75%" }}
steps={[
{
id: "start",
message:
"Hi! Welcome to the SHPE UTDallas chapter website! In order to better assist you, are you a: ",
trigger: "company_or_student",
},
{
id: "company_or_student",
options: [
{ value: "Student", label: "Student", trigger: "student" },
{
value: "Professional",
label: "Professional",
trigger: "professional",
},
{ value: "Recruiter", label: "Recruiter", trigger: "recruiter" },
{ value: "Company", label: "Company", trigger: "company" },
],
},
{
id: "student",
message: "What are you looking for?",
trigger: "student_questions",
},
{
id: "student_questions",
options: [
{
value: "Getting involved",
label: "Getting involved",
trigger: "get_involved",
},
{
value: "Paying membership fees",
label: "Paying membership fees",
trigger: "paying_membership_fees",
},
],
},
{
id: "get_involved",
message:
"Thats awesome! The best way to stay involved is to subscribe to our newletter. Attend enough events and you could get sponsored for the SHPE National Convention. Are you a Freshman, Sophomore, Junior, Senior, or Graduate Student?",
trigger: "grade_level_question_getting_involved",
},
{
id: "grade_level_question_getting_involved",
options: [
{
value: "Freshman",
label: "Freshman",
trigger: "freshman_getting_involved",
},
{
value: "Sophomore",
label: "Sophomore",
trigger: "sophomore_getting_involved",
},
{
value: "Junior",
label: "Junior",
trigger: "junior_getting_involved",
},
{
value: "Senior",
label: "Senior",
trigger: "senior_getting_involved",
},
{
value: "Graduate Student",
label: "Graduate Student",
trigger: "graduate_getting_involved",
},
],
},
{
id: "freshman_getting_involved",
message:
"Welcome to UT Dallas! We'd love to have you join our Freshman round table! You get to participate in officer meetings and pitch in. Links are sent in our newsletter. You can also apply to become a mentee. Clink the button below to join: ",
trigger: "newsletter_signup",
},
{
id: "sophomore_getting_involved",
message:
"Consider applying to become a mentee. We have mentors with great experience that can help you in your professional, academic, or personal life. There is more information in our newsletter, click the link below to join: ",
trigger: "newsletter_signup",
},
{
id: "junior_getting_involved",
message:
"Consier becoming a mentor and helping out our younger members. There is more information in our newsletter, click the link below to join: ",
trigger: "newsletter_signup",
},
{
id: "senior_getting_involved",
message:
"We host a variety of events targeted at helping our members find jobs. Checkout our newsletter for more detailed information: ",
trigger: "newsletter_signup",
},
{
id: "graduate_getting_involved",
message:
"We host a variety of events targeted specifically for our Graduate members. There is more information in our newsletter, click the link below to join: ",
trigger: "newsletter_signup",
},
{
id: "newsletter_signup",
component: button("Join Newsletter", "/newsletter"),
},
{
id: "paying_membership_fees",
message: "Click the button below to pay membership fees:",
trigger: "pay_fees_button",
},
{
id: "pay_fees_button",
component: button(
"Pay Fees",
"https://docs.google.com/forms/d/e/1FAIpQLScZIFOctfh9P_OKbf4t1OBrv4eZnqnpNoQ0ppXPWEgKTqZAKA/viewform",
true
),
},
{
id: "professional",
message:
"Thank you for visiting our website! We welcome professionals to come and talk to our members as well as attend our events. Contact our corporate liaison for more information:",
trigger: "corporate_liaison",
},
{
id: "recruiter",
message:
"Thank you for visiting our website! Sponsor companies have access to our ResumeBook website, a collection of all of our member's resumes. Checkout this demo of our ResumeBook website. For full access to our real database of members, please contact our corporate liaison.",
trigger: "resume_book_link",
},
{
id: "company",
message:
"Thank you for visiting our website! We offer a variety of services for our sponsors, including access to our ResumeBook website. Please contact our corporate liaison for more information about the benefits of being a sponsor as well as on how to become one: ",
trigger: "resume_book_link",
},
{
id: "corporate_liaison",
component: officerIcon("Corporate Liason"),
},
{
id: "resume_book_demo",
message:
"Checkout this demo of our ResumeBook website. For full access to our real database of members, please contact our corporate liaison: ",
trigger: "resume_book_link",
},
{
id: "resume_book_link",
component: button(
"ResumeBook Demo",
"https://shpe-utdallas.github.io/ResumeBook/",
true
),
trigger: "corporate_liaison",
},
]}
/>
</ThemeProvider>
);
}
Loading