Skip to content

Commit

Permalink
adicionando o .env
Browse files Browse the repository at this point in the history
  • Loading branch information
FLucasF committed Dec 11, 2024
1 parent 95db094 commit 3bb840a
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 16 deletions.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
3 changes: 1 addition & 2 deletions src/data/questions.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,4 @@
"correct": "Desconfiar de perfis com informações incompletas"
}

]

]
2 changes: 1 addition & 1 deletion src/pages/InformacaoUsuario/InformacaoUsuario.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import styles from './InformacaoUsuario.module.css';
const InformacaoUsuario = () => {
const [userID, setUserID] = useState('');
const navigate = useNavigate();
const API_URL = 'https://activities.a4s.dev.br/api/user';
const API_URL = import.meta.env.VITE_API_USER_URL;

const handleSubmit = async (e) => {
e.preventDefault();
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Quiz/Quiz.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const Quiz = () => {

const saveResponseQuestion = async (response) => {
try {
const result = await axios.post('https://activities.a4s.dev.br/api/response', response);
const result = await axios.post(import.meta.env.VITE_API_RESPONSE_URL, response);
return result.data;
} catch (error) {
console.error('Error saving response:', error);
Expand Down
13 changes: 6 additions & 7 deletions src/pages/Tutorial/Tutorial.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import React from 'react';
import styles from './Tutorial.module.css';

import acertando from '../../../public/assets/tutorial/acertando_quiz.png';
import errando from '../../../public/assets/tutorial/errando_quiz.png';
import feedback from '../../../public/assets/tutorial/feedback.png';
import maisInformacoes from '../../../public/assets/tutorial/mais_informacoes.png';
import finalQuiz from '../../../public/assets/tutorial/final_quiz.png';
import navbar from '../../../public/assets/tutorial/navbar.png'
import acertando from '../../assets/tutorial/acertando_quiz.png';
import errando from '../../assets/tutorial/errando_quiz.png';
import feedback from '../../assets/tutorial/feedback.png';
import maisInformacoes from '../../assets/tutorial/mais_informacoes.png';
import finalQuiz from '../../assets/tutorial/final_quiz.png';
import navbar from '../../assets/tutorial/navbar.png';

const Tutorial = () => {
return (
Expand Down
12 changes: 7 additions & 5 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
base: "/EviteOgolpeWEB/"

})
base: "/EviteOgolpeWEB/",
define: {
'process.env': {}, // Garante compatibilidade com algumas dependências que usam `process.env`
},
});

0 comments on commit 3bb840a

Please sign in to comment.