Skip to content

Commit

Permalink
CompanyName error nav bug
Browse files Browse the repository at this point in the history
  • Loading branch information
matherg committed Dec 11, 2024
1 parent 344a1fc commit b177270
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
3 changes: 0 additions & 3 deletions src/components/Profile/ControlledTimePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ const ControlledTimePicker = (props: ControlledTimePickerProps) => {
name={props.name}
control={props.control}
render={({ field: { ref, ...fieldProps }, fieldState }) => {
if (fieldState.error) {
console.log("Error in TimePicker:", fieldState.error);
}
return (
<ConfigProvider
theme={{
Expand Down
3 changes: 2 additions & 1 deletion src/pages/profile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ const Index: NextPage = () => {
};
const onError = (errors: FieldErrors<OnboardingFormInputs>) => {
const firstErrorKey = Object.keys(errors)[0];

console.log(firstErrorKey);
if (firstErrorKey) {
if (
["preferredName", "pronouns", "role", "bio", "seatAvail"].includes(
Expand All @@ -184,6 +184,7 @@ const Index: NextPage = () => {
[
"startAddress",
"companyAddress",
"companyName",
"startTime",
"endTime",
"daysWorking",
Expand Down
1 change: 1 addition & 0 deletions src/pages/profile/setup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ const Setup: NextPage = () => {
startCoordLat: startAddressHook.selectedAddress.center[1],
seatAvail: values.role === "RIDER" ? 0 : values.seatAvail,
};
console.log(userInfo);
if (selectedFile) {
try {
await uploadFile();
Expand Down
8 changes: 4 additions & 4 deletions src/utils/profile/updateUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ export const updateUser = async ({
seatAvail: userInfo.seatAvail,
companyName: userInfo.companyName,
companyAddress: userInfo.companyAddress,
companyCoordLng: userInfo.companyCoordLng!,
companyCoordLat: userInfo.companyCoordLat!,
companyCoordLng: userInfo.companyCoordLng,
companyCoordLat: userInfo.companyCoordLat,
startAddress: userInfo.startAddress,
startCoordLng: userInfo.startCoordLng!,
startCoordLat: userInfo.startCoordLat!,
startCoordLng: userInfo.startCoordLng,
startCoordLat: userInfo.startCoordLat,
isOnboarded: true,
preferredName: userInfo.preferredName || sessionName,
pronouns: userInfo.pronouns,
Expand Down
5 changes: 4 additions & 1 deletion src/utils/publicUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export const generatePoiData = async (
longitude: number,
latitude: number
): Promise<PoiData> => {
console.log(longitude + "\n" + latitude);

const endpoint = [
"https://api.mapbox.com/geocoding/v5/mapbox.places/",
longitude,
Expand All @@ -60,10 +62,11 @@ export const generatePoiData = async (
".json?types=poi&access_token=",
serverEnv.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN,
].join("");

console.log(endpoint);
const data = await fetch(endpoint)
.then((response) => response.json())
.catch((err) => {
console.log("throwing here?");
throw new TRPCError({
code: "INTERNAL_SERVER_ERROR",
message: "Unexpected error. Please try again.",
Expand Down

0 comments on commit b177270

Please sign in to comment.