Skip to content

Commit

Permalink
Fix teams order
Browse files Browse the repository at this point in the history
Fix shape margin
Fix logo link
  • Loading branch information
marzban-dev committed Sep 9, 2024
1 parent 3214b7b commit ca25080
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/app/components/About/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const About = () => {
<div className="flex max-lg:flex-col-reverse gap-14 mt-[40px]">
<VideoSection />
<div className="flex-1 max-lg:flex items-center justify-center flex-col">
<ShapeTitle className="py-7 max-lg:!py-8 sm:py-9 w-fit max-w-[270px] xs:max-w-[300px]" textClassName="text-brand-cream text-lg sm:text-xl font-bold">
<ShapeTitle className="lg:mr-16 py-7 max-lg:!py-8 sm:py-9 w-fit max-w-[270px] xs:max-w-[300px]" textClassName="text-brand-cream text-lg sm:text-xl font-bold">
<span className="flex gap-2 items-center">
<span className="font-geo-slab-703">
CS50x SHIRAZ
Expand Down
5 changes: 3 additions & 2 deletions src/app/components/Logo.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import LogoImage from "../../../public/images/logo.png";
import Image from "next/image";
import Link from "next/link";

const Logo = () => {
return (
<div>
<Link href="/">
<Image src={LogoImage} alt="logo" className="w-[32px] sm:w-[42px] lg:w-[58px]"/>
</div>
</Link>
);
};

Expand Down
30 changes: 26 additions & 4 deletions src/app/team/components/RenderTeams.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,32 @@ const RenderTeams = () => {

const grouped = Object.groupBy(employeesGroups, ({ categoryName }) => categoryName);

return Object.keys(grouped).sort((a, b) => {
if (a === "مدرسین" || a === "تیم مدیریت" || a === "تیم فنی") return -1;
return 1;
}).map(categoryName => {
const categories = Object.keys(grouped);
const sortedCategories: string[] = [];

categories.forEach(category => {
if (category === "مدرسین" || category === "تیم مدیریت" || category === "تیم فنی" || category === "تیم علمی") {
if(sortedCategories.includes("تیم علمی")) {
if (sortedCategories.includes("تیم فنی")) {
if (sortedCategories.includes("تیم مدیریت")) {
if (!sortedCategories.includes("مدرسین")) {
sortedCategories.unshift("مدرسین");
}
} else {
sortedCategories.unshift("تیم مدیریت");
}
} else {
sortedCategories.unshift("تیم فنی");
}
} else {
sortedCategories.unshift("تیم علمی");
}
} else {
sortedCategories.push(category);
}
});

return sortedCategories.map(categoryName => {
return (
<TeamDivider
key={categoryName}
Expand Down

0 comments on commit ca25080

Please sign in to comment.