Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add style layout #30

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions Frontend/app/auth/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { Login } from "../../components/login";

export default function Auth() {
return (
<main >
<div className="flex min-h-screen flex-col items-center justify-between p-24">
<Login />
</div>
</main>
);
return <Login />;
}
12 changes: 5 additions & 7 deletions Frontend/app/form/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import PersonalInfoForm from "@/components/personalInfoForm";

export default function Register() {
return (
<main >
<div className="flex min-h-screen flex-col items-center justify-between p-24">
<PersonalInfoForm />
</div>
</main>
);
return (
<main>
<PersonalInfoForm />
</main>
);
}
14 changes: 10 additions & 4 deletions Frontend/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { AuthWrapper } from "@/components/authWrapper";
import { Toaster } from "@/components/ui/toaster";
import Footer from "@/components/footer";
import Header from "@/components/header";
import { cn } from "@/lib/utils";

const inter = Inter({ subsets: ["latin"] });

Expand All @@ -22,17 +23,22 @@ export default function RootLayout({
}) {
return (
<ReactQueryClientProvider>
<html lang="en">
<body className={inter.className}>
<html lang="fr">
<body
className={cn(
inter.className,
"min-h-screen relative flex flex-col justify-between"
)}
>
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
<Header/>
<Header />
<AuthWrapper>{children}</AuthWrapper>
<Footer/>
<Footer />
<Toaster />
</ThemeProvider>
</body>
Expand Down
10 changes: 2 additions & 8 deletions Frontend/app/legal-notice/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import LegalNotice from "@/components/legalNotice";

export default function legal() {
return (
<main >
<div className="flex min-h-screen flex-col items-center justify-between p-24">
<LegalNotice />
</div>
</main>
);
}
return <LegalNotice />;
}
36 changes: 1 addition & 35 deletions Frontend/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,46 +1,12 @@
"use client";

import { uploadResume } from "@/api/upload";

import HomePage from "@/components/home";
import { toast } from "@/components/ui/use-toast";
import { useState } from "react";
import { useMutation } from "react-query";

export type Upload = {
selectedFile: File;
userId: string;
};

export default function Home() {
const [selectedFile, setSelectedFile] = useState<File>();
const userId = "1";
const data = { selectedFile, userId };
const { mutate } = useMutation(uploadResume, {
onError: () => {
toast({
variant: "destructive",
title: "Upload failed",
description: "There was an error uploading the file. Please try again.",
});
},
onSuccess: () => {
toast({
title: "Upload successful",
description: "Your resume has been uploaded successfully!",
});
},
});

// const onSubmit = async (data: Upload) => {
// mutate(data);
// console.log("data");
// };
return (
<main>
<div className="flex justify-center items-center min-h-screen ">
<HomePage />
</div>
</main>
);
return <HomePage />;
}
6 changes: 1 addition & 5 deletions Frontend/app/profile/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ const ProfilePage = () => {
.catch((error) => console.error("Failed to get user:", error));
}, [user, userId]);

return (
<main className="flex min-h-screen flex-col items-center justify-between p-24">
<Profile data={user} cvList={cvList} />
</main>
);
return <Profile data={user} cvList={cvList} />;
};
export default ProfilePage;
8 changes: 1 addition & 7 deletions Frontend/app/register/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import RegisterForm from "@/components/register";

export default function Register() {
return (
<main >
<div className="flex min-h-screen flex-col items-center justify-between p-24">
<RegisterForm />
</div>
</main>
);
return <RegisterForm />;
}
6 changes: 3 additions & 3 deletions Frontend/components/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { version } from "../package.json"
import { version } from "../package.json";

const Footer = () => {
return (
<footer className="p-4 border-t bg-card">
<footer className="pt-10 px-4 border-t bg-card">
<div className="max-w-[1400px] mx-auto flex items-center justify-center gap-1 flex-col sm:flex-row sm:gap-5">
<p className="text-muted-foreground">
© {new Date().getFullYear()} Jobbi - Tout droits résérvés
Expand All @@ -20,4 +20,4 @@ const Footer = () => {
);
};

export default Footer;
export default Footer;
12 changes: 6 additions & 6 deletions Frontend/components/home.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { ArrowRight, FileText, Search, Share2 } from 'lucide-react';
import React from "react";
import { ArrowRight, FileText, Search, Share2 } from "lucide-react";
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
import Link from 'next/link';
Expand All @@ -9,7 +9,6 @@ const HomePage = () => {
const token = $accessToken.get();

return (
<div className="min-h-screen bg-background">
<main className="pt-20 sm:pt-24 lg:pt-32"> {/* Ajout de padding-top ici */}
<section className="container mx-auto py-12 px-4 sm:px-6 lg:px-8">
<div className="text-center">
Expand Down Expand Up @@ -61,8 +60,9 @@ const HomePage = () => {
</div>
</section>
</main>
</div>
);
</section>
</main>
);
};

export default HomePage;
export default HomePage;
Loading