Skip to content

Commit

Permalink
renamed BASE_API_URL to HOHOHO_BASE_API_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
daniloccangucu committed Nov 18, 2024
1 parent eade17b commit f76c747
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useDispatch } from 'react-redux';
import { setHohohoApplicationData, setHohohoEmail, setHohohoToken } from '../../../../redux/hohohoSlice';

import { loadApplicationData } from '../../../../utils/MyApplicationUtils';
import { BASE_API_URL } from '../../../../utils/HohohoUtils';
import { HOHOHO_BASE_API_URL } from '../../../../utils/HohohoUtils';
import Button from '../../../../components-elements/Button';
import { useTranslation } from 'react-i18next';

Expand All @@ -26,7 +26,7 @@ const LoginForm: React.FC = () => {

try {
setStatusMessage("Submitting...");
const response = await axios.post(`${BASE_API_URL}/login`, {
const response = await axios.post(`${HOHOHO_BASE_API_URL}/login`, {
email: data.email,
code: data.code,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState } from 'react';
import { useForm } from 'react-hook-form';
import axios from 'axios';

import { BASE_API_URL } from '../../../../utils/HohohoUtils';
import { HOHOHO_BASE_API_URL } from '../../../../utils/HohohoUtils';
import Button from '../../../../components-elements/Button';
import { useSelector } from 'react-redux';
import { RootState } from '../../../../../../redux/store';
Expand All @@ -22,7 +22,7 @@ const RegisterForm: React.FC = () => {
setStatusMessage(null);

try {
const response = await axios.post(`${BASE_API_URL}/register`, {
const response = await axios.post(`${HOHOHO_BASE_API_URL}/register`, {
email: data.email,
lang,
});
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Hohoho/utils/HohohoUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import gsap from "gsap";
import { SnowFlake, SnowflakeAmount, SnowFlakeWeight } from "../HohohoTypes";

export const BASE_URL = "https://danilocangucu.net/my-website/assets/hohoho";
export const BASE_API_URL = "https:/danilocangucu.net/api/hohoho";
export const HOHOHO_BASE_API_URL = "https:/danilocangucu.net/api/hohoho";

const HEAVY_SNOW_FLAKE_URL = `${BASE_URL}/snow1.png`;
const MEDIUM_SNOW_FLAKE_URL = `${BASE_URL}/snow2.png`;
Expand Down
6 changes: 3 additions & 3 deletions src/pages/Hohoho/utils/MyApplicationUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import axios from "axios";
import gsap from "gsap";

import { ApplicationDetailsDTO } from "../HohohoTypes";
import { BASE_API_URL } from "./HohohoUtils";
import { HOHOHO_BASE_API_URL } from "./HohohoUtils";

export const inputClass = 'input-modern';

Expand All @@ -19,7 +19,7 @@ interface loadApplicationReturn {

export const loadApplicationData = async (token: string): Promise<loadApplicationReturn> => {
try {
const response: LoadFormDataResponse = await axios.get(`${BASE_API_URL}/applications`, {
const response: LoadFormDataResponse = await axios.get(`${HOHOHO_BASE_API_URL}/applications`, {
headers: {
Authorization: `Bearer ${token}`,
},
Expand Down Expand Up @@ -52,7 +52,7 @@ export const createEmptyApplication = () => ({

export const submitApplication = async (formData: any, token: string) => {
try {
const response = await fetch(`${BASE_API_URL}/applications/`, {
const response = await fetch(`${HOHOHO_BASE_API_URL}/applications/`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down

0 comments on commit f76c747

Please sign in to comment.