Skip to content

Commit

Permalink
commit typings
Browse files Browse the repository at this point in the history
  • Loading branch information
IslemMedjahdi committed Jan 4, 2023
1 parent 55bf559 commit d061a48
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 18 deletions.
Binary file added public/auth-background1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/auth-background2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 11 additions & 6 deletions src/components/auth/AuthIndex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const AuthIndex = () => {
return (
<div className="grid h-screen grid-cols-1 text-gray-900 md:grid-cols-2">
<div
style={{ backgroundImage: `url(${IMAGES.Auth_background})` }}
style={{ backgroundImage: `url(${IMAGES.Auth_background_mobile})` }}
className="flex h-full w-full flex-col bg-white bg-cover bg-no-repeat p-8 md:!bg-none"
>
<div className="flex cursor-pointer flex-wrap items-baseline gap-2">
Expand All @@ -52,15 +52,20 @@ const AuthIndex = () => {
)}
</div>
<div className="flex justify-center">
<p className="text-sm font-medium">
<p className="text-sm font-medium text-white md:text-gray-900">
Copyright ©{new Date().getFullYear()} {origin} All rights reserved
</p>
</div>
</div>
<div
className="hidden h-full w-full bg-cover bg-no-repeat md:block"
style={{ backgroundImage: `url(${IMAGES.Auth_background})` }}
/>
<div className="hidden h-full w-full md:block">
<Image
src={IMAGES.Auth_background}
alt="auth background"
className="h-full w-full object-cover"
width={1280}
height={720}
/>
</div>
</div>
);
};
Expand Down
8 changes: 6 additions & 2 deletions src/components/layout/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ const Header = () => {
</div>
<div className="flex items-center gap-x-4">
<nav className="hidden items-center gap-x-4 md:flex ">
{NAV.map((item) => (
<Link className="text-base font-medium" href={item.path}>
{NAV.map((item, index) => (
<Link
key={index}
className="text-base font-semibold"
href={item.path}
>
{item.name}
</Link>
))}
Expand Down
12 changes: 6 additions & 6 deletions src/components/layout/header/ProfileMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const ProfileMenu = () => {
}
const ProfileImage = () => (
<div className="rounded-full bg-blue-primary p-2 text-sm font-medium text-white">
{currentUser.firstName[0]} {currentUser.lastName[0]}
{currentUser.prenom[0]} {currentUser.nom[0]}
</div>
);

Expand All @@ -41,12 +41,12 @@ const ProfileMenu = () => {
>
<ProfileImage />
<p>
{currentUser.firstName} {currentUser.lastName}
{currentUser.prenom} {currentUser.nom}
</p>
</Link>
</Menu.Item>
{MENU_NAV.map((item) => (
<Menu.Item>
{MENU_NAV.map((item, index) => (
<Menu.Item key={index}>
<Link
className="flex flex-wrap items-center gap-x-2 px-3 py-4 text-sm font-medium hover:bg-gray-50"
href={item.path}
Expand All @@ -55,8 +55,8 @@ const ProfileMenu = () => {
</Link>
</Menu.Item>
))}
{NAV.map((item) => (
<Menu.Item>
{NAV.map((item, index) => (
<Menu.Item key={index}>
<Link
className="flex flex-wrap items-center gap-x-2 px-2 py-4 text-sm font-medium hover:bg-gray-50 md:hidden "
href={item.path}
Expand Down
3 changes: 2 additions & 1 deletion src/constants/images.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const IMAGES = {
Logo: "/logo.svg",
Auth_background: "/auth-background.png",
Auth_background_mobile: "/auth-background1.png",
Auth_background: "/auth-background2.png",
};
File renamed without changes.
2 changes: 1 addition & 1 deletion src/constants/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const ROUTES = {
allowedRoles: [ROLES.ADMIN, ROLES.USER],
},
POSTED_ANNOUNCEMENTS: {
name: "Annonces déposé",
name: "Annonces déposées",
path: "/posted-announcements",
pathname: "/posted-announcements",
allowedRoles: [ROLES.USER],
Expand Down
4 changes: 2 additions & 2 deletions src/typings/user.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { ROLES } from "../constants/roles";
declare module Auth {
type User = {
email: string;
firstName: string;
lastName: string;
nom: string;
prenom: string;
role: ROLES;
};
}

0 comments on commit d061a48

Please sign in to comment.