Skip to content

Commit

Permalink
fix:Contact Page + .env
Browse files Browse the repository at this point in the history
  • Loading branch information
JiyaGupta-cs committed Sep 30, 2024
1 parent 698887e commit cb4d8fd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 24 deletions.
4 changes: 1 addition & 3 deletions src/components/Contact.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useState } from "react";
import axios from "axios";
import env from "react-dotenv";

const url = process.env.REACT_APP_BACKEND_URL;
import {
FaDiscord,
FaReddit,
Expand All @@ -12,7 +11,6 @@ import {
} from 'react-icons/fa';

const Contact = () => {
const url = env.url;
const [data, setData] = useState({
name: "",
email: "",
Expand Down
33 changes: 12 additions & 21 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
import { defineConfig } from "vite";
import path from "path";
import react from "@vitejs/plugin-react";
import viteTsconfigPaths from "vite-tsconfig-paths";
import svgrPlugin from "vite-plugin-svgr";

// https://vitejs.dev/config/
import { defineConfig } from "vite";
import { config } from 'dotenv';
config();
export default defineConfig({
server: {
watch: {
usePolling: true,
plugins: [react()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
host: true,
port: 8080,
},

plugins: [
react(),
viteTsconfigPaths(),
svgrPlugin({
svgrOptions: {
icon: true,
},
}),
],
});
define: {
'process.env': process.env
}
});

0 comments on commit cb4d8fd

Please sign in to comment.