Skip to content

Commit

Permalink
Move tags
Browse files Browse the repository at this point in the history
  • Loading branch information
TyHil committed Nov 15, 2024
1 parent 0715f3c commit a03e2eb
Showing 1 changed file with 36 additions and 36 deletions.
72 changes: 36 additions & 36 deletions src/components/common/SingleProfInfo/singleProfInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,6 @@ function SingleProfInfo({ rmp }: Props) {
return (
<Grid container spacing={2} className="p-4">
{/* Loading skeletons for each metric */}
<Grid size={12}>
<div className="flex gap-1 flex-wrap">
{loadingTags.map((tag, index) => (
<Skeleton key={index} variant="rounded" className="rounded-full">
<Chip label={tag} />
</Skeleton>
))}
<Skeleton variant="rounded" className="rounded-full">
<IconButton size="small">
<ExpandMoreIcon />
</IconButton>
</Skeleton>
</div>
</Grid>

<Grid size={6}>
<Skeleton variant="rounded">
<p className="text-xl font-bold">5.0</p>
Expand All @@ -74,6 +59,21 @@ function SingleProfInfo({ rmp }: Props) {
<p>Would take again</p>
</Grid>

<Grid size={12}>
<div className="flex gap-1 flex-wrap">
{loadingTags.map((tag, index) => (
<Skeleton key={index} variant="rounded" className="rounded-full">
<Chip label={tag} />
</Skeleton>
))}
<Skeleton variant="rounded" className="rounded-full">
<IconButton size="small">
<ExpandMoreIcon />
</IconButton>
</Skeleton>
</div>
</Grid>

<Grid size={12}>
<Skeleton variant="rounded">
<p>Visit Rate My Professors</p>
Expand Down Expand Up @@ -115,6 +115,27 @@ function SingleProfInfo({ rmp }: Props) {

return (
<Grid container spacing={2} className="p-4">
<Grid size={6}>
<p className="text-xl font-bold">{rmp.data.avgRating}</p>
<p>Professor rating</p>
</Grid>
<Grid size={6}>
<p className="text-xl font-bold">{rmp.data.avgDifficulty}</p>
<p>Difficulty</p>
</Grid>
<Grid size={6}>
<p className="text-xl font-bold">
{rmp.data.numRatings.toLocaleString()}
</p>
<p>Ratings given</p>
</Grid>
<Grid size={6}>
<p className="text-xl font-bold">
{rmp.data.wouldTakeAgainPercent.toFixed(0) + '%'}
</p>
<p>Would take again</p>
</Grid>

{first5.length > 0 && (
<Grid size={12}>
<div className="flex gap-y-1 flex-wrap">
Expand Down Expand Up @@ -154,27 +175,6 @@ function SingleProfInfo({ rmp }: Props) {
</Grid>
)}

<Grid size={6}>
<p className="text-xl font-bold">{rmp.data.avgRating}</p>
<p>Professor rating</p>
</Grid>
<Grid size={6}>
<p className="text-xl font-bold">{rmp.data.avgDifficulty}</p>
<p>Difficulty</p>
</Grid>
<Grid size={6}>
<p className="text-xl font-bold">
{rmp.data.numRatings.toLocaleString()}
</p>
<p>Ratings given</p>
</Grid>
<Grid size={6}>
<p className="text-xl font-bold">
{rmp.data.wouldTakeAgainPercent.toFixed(0) + '%'}
</p>
<p>Would take again</p>
</Grid>

<Grid size={12}>
<Link
href={
Expand Down

0 comments on commit a03e2eb

Please sign in to comment.