Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
arianecrestani committed Jul 5, 2023
1 parent b597302 commit 48e550c
Show file tree
Hide file tree
Showing 15 changed files with 1,621 additions and 39,368 deletions.
11 changes: 5 additions & 6 deletions apps/codac-community/src/components/community/Cohort.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
import { ProfileCard, SkeletonCards } from "codac-ui";
import { SkeletonCards, CohortCard } from "codac-ui";

import { useGetCohortByName } from "#/graphql/hooks";

export const Cohort = ({ cohortName }: { cohortName: string }) => {
const { cohort, loading, error } = useGetCohortByName(cohortName);

return (
<div className="">
<div>
<div className="m-2 space-y-10 text-lg font-medium text-white">Cohort</div>
</div>
<div className="flex justify-center">
{loading && <SkeletonCards number={3} isLoading={loading} />}
{error && <div>something is wrong</div>}
<div className="flex grid-cols-4 gap-8">
{cohort && (
<div key={cohort.id} className="">
{cohort.attributes && (
<div className=" ">
<ProfileCard

<CohortCard
image={cohort.attributes.logo?.data.attributes.url}
title={cohort.attributes.name ?? ""}
startDate={cohort.attributes.start_date ?? ""}
/>
</div>
)}
Expand Down
6 changes: 3 additions & 3 deletions apps/codac-community/src/components/community/Mentor.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Card, SkeletonCards } from "codac-ui";
import { ProfileCard, SkeletonCards } from "codac-ui";

import { useGetMentor } from "#/graphql/hooks";

Expand All @@ -7,15 +7,15 @@ export const Mentor = ({ id }: { id: string }) => {
console.log(mentor);

return (
<div className="flex min-w-[50rem]">
<div className="flex justify-center">
{loading && <SkeletonCards number={3} isLoading={loading} />}
{error && <div>something is wrong</div>}
<div className="">
{mentor && (
<div key={mentor.id}>
{mentor.attributes && (
<div className="">
<Card
<ProfileCard
image={mentor.attributes.user?.data.attributes.avatar?.data.attributes.url ?? ""}
title={mentor.attributes.user?.data.attributes.username}
github={mentor?.attributes?.github ?? ""}
Expand Down
8 changes: 5 additions & 3 deletions apps/codac-community/src/components/community/Student.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Card, SkeletonCards } from "codac-ui";
import { ProfileCard, SkeletonCards } from "codac-ui";

import { useGetStudent } from "#/graphql/hooks";

Expand All @@ -8,19 +8,21 @@ export const Student = ({ id }: { id: string }) => {
console.log("Student component (student): ", student, id);

return (
<div className="space-y-6">
<div className="flex justify-center">
{loading && <SkeletonCards number={3} isLoading={loading} />}
{error && <div>something is wrong</div>}
<div className="flex grid-cols-4 gap-2 text-white">
{student && (
<div key={student.id}>
{student.attributes && (
<div className="relative object-cover text-white">
<Card
<ProfileCard
image={student.attributes.user?.data.attributes.avatar?.data.attributes.url ?? ""}
title={student.attributes.firstname ?? ""}
title={student.attributes.lastname ?? ""}
github={student?.attributes?.github ?? ""}
linkdin={student?.attributes?.linkedin ?? ""}
course={student.attributes?.course?.data?.attributes?.name || ""}
/>
</div>
)}
Expand Down
8 changes: 3 additions & 5 deletions apps/codac-community/src/components/community/StudentList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ function StudentList({ cohortName }: { cohortName: string }) {

return (
<>
<div className="space-y-10">
<div>
<div className="text-lg font-medium text-white">Students</div>
</div>
<div className="">

{loading && <SkeletonCards number={3} isLoading={loading} />}
<div className="flex min-w-full grid-cols-5 flex-wrap gap-4 object-cover">
<div className="m-2 flex min-w-full grid-cols-5 flex-wrap object-cover">
{students &&
students.map((student) => <StudentCard key={student.id} student={student} />)}
</div>
Expand Down
7 changes: 3 additions & 4 deletions apps/codac-community/src/pages/community/cohort/[id].tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import router from "next/router";

import { Cohort } from "#/components/community/Cohort";
import StudentList from "#/components/community/StudentList";
import router from "next/router";

export default function CohortPage() {
const cohortName = (router.query.id as string) ?? "";
return (
<>
<div className="">
<Cohort cohortName={cohortName} />
<StudentList cohortName={cohortName} />
</>
</div>
);
}
5 changes: 3 additions & 2 deletions apps/codac-community/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"esModuleInterop": true,
"incremental": true
"incremental": true,
"noEmit": true
},
"include": [
"next-env.d.ts",
Expand All @@ -21,4 +22,4 @@
"exclude": [
"node_modules"
]
}
}
2 changes: 1 addition & 1 deletion apps/codac-quasseln/src/pages/main-chat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React, { useEffect, useState } from 'react'
import { gql, useQuery } from "@apollo/client";
import Link from 'next/link';
import { useSocket } from '#/contexts/socketContext';
import { Enum_Componentleadlifecycle_State } from 'codac-graphql-types';
import { Enum_Componentleadlifecycle_State } from "codac-graphql-types";



Expand Down
Loading

0 comments on commit 48e550c

Please sign in to comment.