Skip to content

Commit

Permalink
edit profile updated
Browse files Browse the repository at this point in the history
  • Loading branch information
SiddhantKotak committed Aug 10, 2024
1 parent 55a15ee commit 411a036
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Signin from "./pages/Signin";
import Profile from "./pages/Profile";
import Pricing from "./pages/Pricing";
import CreateProject from "./pages/CreateProject";
import SetProfile from "./pages/SetProfile";

function App() {
return (
Expand All @@ -17,6 +18,7 @@ function App() {
<Route path="/signin" element={<Signin />} />
<Route path="/pricing" element={<Pricing />} />
<Route path="/profile" element={<Profile />} />
<Route path="/setProfile" element={<SetProfile />} />
<Route path="/create-project" element={<CreateProject />} />
</Routes>
</BrowserRouter>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Loading.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const Loading = () => {
return (
<section className="bg-gray-900 flex flex-col items-center justify-center min-h-screen w-screen">
<section className="bg-white flex flex-col items-center justify-center min-h-screen w-screen">
{/* Rotating rings */}
<div className="w-full h-full flex flex-col justify-center items-center mb-20">
<div className="relative flex items-center justify-center w-40 h-40 mb-10">
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/components/ProfileInputs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const ProfileInputs = () => {

try {
const res = await axios.put(
`${BACKEND_URL}/api/v1/user/updateUser`,
`${BACKEND_URL}/api/v1/user/updateProfile`,
userInput,
{
headers: headers,
Expand Down Expand Up @@ -98,16 +98,16 @@ const ProfileInputs = () => {
return (
<>
{loading ? (
<div className="w-screen h-full p-6 bg-gray-800 flex items-center mt-16 justify-center">
<div className="w-screen min-h-full p-6 bg-white flex items-center mt-12 justify-center">
<Toaster />
<div className="container max-w-screen-md mx-auto py-10 flex flex-col items-center">
<div className="text-white text-5xl font-bold font-playwrite mb-10 ">
<div className="container max-w-screen-md h-full mx-auto py-10 flex flex-col items-center">
<div className="text-black text-5xl font-bold font-playwrite mb-10 mt-10">
{user ? <span>Update</span> : <span>Set</span>} Your Profile
</div>
<div className="px-8">
<div className="bg-gray-900 border-white border-2 rounded shadow-lg p-4 px-4 md:p-12 mb-6">
<div className="bg-white border-2 border-black rounded shadow-lg p-4 px-4 md:p-12 mb-6">
<div className="lg:col-span-2 gap-4">
<div className="grid gap-4 gap-y-2 text-sm grid-cols-1 text-white md:grid-cols-5">
<div className="grid gap-4 gap-y-2 text-sm grid-cols-1 text-black md:grid-cols-5">
{user ? (
<div className="md:col-span-5 mb-6">
<label className="text-xl">Name :</label>
Expand Down Expand Up @@ -177,7 +177,7 @@ const ProfileInputs = () => {
</div>

<div className="md:col-span-1">
<label className="text-xl">Pincode : </label>
<label className="text-xl">Age : </label>
<input
type="number"
onChange={(e) => handleChange(e, "age")}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/SetProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Navbar from "../components/Navbar";

const SetProfile: React.FC = () => {
return (
<div className="w-screen h-full md:h-screen flex flex-col overflow-x-hidden">
<div className="w-screen h-full md:h-full flex flex-col overflow-x-hidden">
<Navbar />
<ProfileInputs />
<Footer />
Expand Down

0 comments on commit 411a036

Please sign in to comment.