Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Typeform Survey #174

Merged
merged 1 commit into from
Sep 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
27 changes: 25 additions & 2 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@typeform/embed-react": "^2.31.0",
"axios": "^1.3.3",
"framer-motion": "^9.0.0",
"react": "^18.2.0",
Expand Down
2 changes: 2 additions & 0 deletions src/pages/Profile/ProfileMentee.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Avatar, Typography, Grid, Box } from "@mui/material";
import { Switch } from "@mui/material";
import FormControlLabel from "@mui/material/FormControlLabel";
import { styled } from "@mui/material/styles";
import Survey from "./Survey"

export default function ProfileMentee({ token, pk, setAuth }) {
// first name, last name, phone number
Expand Down Expand Up @@ -232,6 +233,7 @@ export default function ProfileMentee({ token, pk, setAuth }) {
</Grid>
</Box>
</Box>
<Survey/>
</Box >
);
}
2 changes: 2 additions & 0 deletions src/pages/Profile/ProfileMentor.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { Switch } from "@mui/material";
import FormControlLabel from "@mui/material/FormControlLabel";
import TimeSlot from "../Profile/TimeSlot";
import { styled } from "@mui/material/styles";
import Survey from "./Survey"

export default function ProfileMentor({ token, pk, setAuth }) {
// first name, last name, phone number
Expand Down Expand Up @@ -405,6 +406,7 @@ export default function ProfileMentor({ token, pk, setAuth }) {
/>
</Box>
</Stack>
<Survey/>
</Box>
);
}
20 changes: 20 additions & 0 deletions src/pages/Profile/Survey.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// This component is for surveys on how to make the app better.

import { Sidetab } from '@typeform/embed-react'

export default function Survey(){
const survey_username = localStorage.getItem("momentorsUserName")

const hidden_field = {
username: survey_username
}


return (
<Sidetab
id={process.env.REACT_APP_WEBSITE_FEEDBACK_FORM}
buttonText="click to open"
hidden={survey_username}
/>
)
}