|
@@ -69,8 +69,15 @@ export default function AuthProvider({ children }: { children: ReactNode }) {
|
|
|
|
|
|
|
|
const login = async (username: string, password: string) => {
|
|
const login = async (username: string, password: string) => {
|
|
|
try {
|
|
try {
|
|
|
|
|
+ const apiUrl = process.env.EXPO_PUBLIC_API_URL;
|
|
|
|
|
+ if (!apiUrl) {
|
|
|
|
|
+ throw new Error(
|
|
|
|
|
+ 'API URL is not defined in environment variables'
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
const response = await axios.post(
|
|
const response = await axios.post(
|
|
|
- 'http://192.168.1.33:12000/api/v1/clients/customer/sign-in',
|
|
|
|
|
|
|
+ `${apiUrl}/clients/customer/sign-in`,
|
|
|
|
|
+ // 'http://192.168.1.33:12000/api/v1/clients/customer/sign-in',
|
|
|
{
|
|
{
|
|
|
email: username,
|
|
email: username,
|
|
|
password: password
|
|
password: password
|