Skip to content
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
4 changes: 2 additions & 2 deletions hasura/metadata/tables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@
definition:
enable_manual: false
insert:
columns: '*'
columns: "*"
retry_conf:
num_retries: 5
interval_sec: 30
Expand Down Expand Up @@ -511,7 +511,7 @@
definition:
enable_manual: false
insert:
columns: '*'
columns: "*"
retry_conf:
num_retries: 5
interval_sec: 30
Expand Down
2 changes: 2 additions & 0 deletions i18n/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ export default {
topics:
"What topic are you interested in ? Don't worry you can change it later",
submit: "Submit",
warningAgencyTitle: "Warning",
warningAgency: "To fully utilize Skillz, please fill out your agency.",
},
skillLevels: {
1: "I looked at what it was",
Expand Down
3 changes: 3 additions & 0 deletions i18n/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ export default {
topics:
"Quels sujets vous intéressent ? Ne vous en faites pas vous pouvez modifier vos choix plus tard",
submit: "Envoyer",
warningAgencyTitle: "Attention",
warningAgency:
"Pour utiliser pleinement Skillz, veuillez renseigner votre agence.",
},
skillLevels: {
1: "J'ai regardé ce que c'était",
Expand Down
15 changes: 10 additions & 5 deletions src/components/BotNotifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ export const BotNotifications = ({ t }: { t: (path: string) => string }) => {
const [setBotNotification] = useMutation(SET_BOT_NOTIFICATIONS);

function changeBotNotification() {
if (userDatas?.User[0].botNotifications === values[0]) {
if (
userDatas?.User.length > 0 &&
userDatas?.User[0].botNotifications === values[0]
) {
setBotNotification({
variables: {
email: user.email,
Expand All @@ -47,10 +50,12 @@ export const BotNotifications = ({ t }: { t: (path: string) => string }) => {
<ul className="flex flex-row justify-around">
<li>🔇</li>
<li>
<SlidingCheckbox
selectedValue={userDatas?.User[0].botNotifications}
values={values}
/>
{userDatas?.User[0] && (
<SlidingCheckbox
selectedValue={userDatas?.User[0].botNotifications}
values={values}
/>
)}
</li>
<li>🔔</li>
</ul>
Expand Down
1 change: 0 additions & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const Home = ({ pathName }) => {
if (userData?.User.length <= 0) {
push(link);
}

const { data: skillsData, error } =
useQuery<GetCurrentUserSkillsAndDesiresQuery>(
GET_USER_CURRRENT_SKILLS_AND_DESIRES_QUERY,
Expand Down
8 changes: 8 additions & 0 deletions src/pages/profile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,14 @@ const Profile = () => {
}`}
>
<div className="p-2 text-xl">{t("myProfile.agency")}</div>
{!userAgency && (
<div className="border-l-4 p-4 mb-4 border-dark-red" role="alert">
<p className="font-bold text-dark-red">
{t("createProfile.warningAgencyTitle")}
</p>
<p>{t("createProfile.warningAgency")}</p>
</div>
)}
<CustomSelect
labelFn={(x) => x}
keyFn={(x) => x}
Expand Down