Skip to content

Commit cb4d8fd

Browse files
committed
fix:Contact Page + .env
1 parent 698887e commit cb4d8fd

File tree

2 files changed

+13
-24
lines changed

2 files changed

+13
-24
lines changed

src/components/Contact.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React, { useState } from "react";
22
import axios from "axios";
3-
import env from "react-dotenv";
4-
3+
const url = process.env.REACT_APP_BACKEND_URL;
54
import {
65
FaDiscord,
76
FaReddit,
@@ -12,7 +11,6 @@ import {
1211
} from 'react-icons/fa';
1312

1413
const Contact = () => {
15-
const url = env.url;
1614
const [data, setData] = useState({
1715
name: "",
1816
email: "",

vite.config.ts

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,16 @@
1-
import { defineConfig } from "vite";
1+
import path from "path";
22
import react from "@vitejs/plugin-react";
3-
import viteTsconfigPaths from "vite-tsconfig-paths";
4-
import svgrPlugin from "vite-plugin-svgr";
5-
6-
// https://vitejs.dev/config/
3+
import { defineConfig } from "vite";
4+
import { config } from 'dotenv';
5+
config();
76
export default defineConfig({
8-
server: {
9-
watch: {
10-
usePolling: true,
7+
plugins: [react()],
8+
resolve: {
9+
alias: {
10+
"@": path.resolve(__dirname, "./src"),
1111
},
12-
host: true,
13-
port: 8080,
1412
},
15-
16-
plugins: [
17-
react(),
18-
viteTsconfigPaths(),
19-
svgrPlugin({
20-
svgrOptions: {
21-
icon: true,
22-
},
23-
}),
24-
],
25-
});
13+
define: {
14+
'process.env': process.env
15+
}
16+
});

0 commit comments

Comments
 (0)