Skip to content

Commit

Permalink
fix backend urls
Browse files Browse the repository at this point in the history
  • Loading branch information
bastipnt committed Aug 28, 2024
1 parent d47c869 commit 06d06ef
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/hooks/useChatBot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import useFetch from "./useFetch";
import { UserContext } from "../providers/userProvider";
import { StateContext } from "../providers/stateProvider";

const BACKEND_URL = `http://${import.meta.env.VITE_BACKEND_URL}/chat`;
const BACKEND_URL = `${import.meta.env.VITE_BACKEND_URL}/chat`;

const useChatBot = () => {
const { user } = useContext(UserContext);
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useTTS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { SettingsContext } from "../providers/settingsProvider";
import TTSDisabledError from "../errors/ttsDisabledError";
import TTSNetworkError from "../errors/ttsNetworkError";

const BACKEND_URL = `http://${import.meta.env.VITE_BACKEND_URL}`;
const BACKEND_URL = `${import.meta.env.VITE_BACKEND_URL}`;
const ctx = new AudioContext();

const useTTS = () => {
Expand Down
4 changes: 2 additions & 2 deletions src/providers/userProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import { DBUser } from "../store";
import useFetch from "../hooks/useFetch";
import ServerMessage, { Role, Topic } from "../utils/serverMessage";

const USER_URL = `http://${import.meta.env.VITE_BACKEND_URL}/user`;
const PROFILE_URL = `http://${import.meta.env.VITE_BACKEND_URL}/profile`;
const USER_URL = `${import.meta.env.VITE_BACKEND_URL}/user`;
const PROFILE_URL = `${import.meta.env.VITE_BACKEND_URL}/profile`;

export const UserContext = createContext<{
user: User | undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/providers/usersProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import User from "../utils/user";
import useFetch from "../hooks/useFetch";

const BACKEND_URL = `http://${import.meta.env.VITE_BACKEND_URL}/users`;
const BACKEND_URL = `${import.meta.env.VITE_BACKEND_URL}/users`;

export const UsersContext = createContext<{
users: User[];
Expand Down
2 changes: 1 addition & 1 deletion src/utils/tts.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const BACKEND_URL = `http://${import.meta.env.VITE_BACKEND_URL}`;
const BACKEND_URL = `${import.meta.env.VITE_BACKEND_URL}`;

class TTS {
private ctx: AudioContext;
Expand Down

0 comments on commit 06d06ef

Please sign in to comment.