-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
237 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
'use client' | ||
import Loading from '@/components/atoms/Loading' | ||
import { useUniversitySearch, useUniversitySearchByName } from '@/services/universitySearch' | ||
import { UniversityInfo } from '@/types/University' | ||
import ImagePlaceholder from '@assets/unibuzz-orange.png' | ||
import { useParams } from 'next/navigation' | ||
|
||
import React, { useEffect } from 'react' | ||
|
||
export default function UniversityProfile() { | ||
const params = useParams() | ||
const { id: universityName } = params | ||
const { data: university, isLoading: isUniversityLoading } = useUniversitySearchByName(universityName as string) | ||
if (isUniversityLoading) return <Loading /> | ||
return ( | ||
<div className="p-28 "> | ||
<div className="flex gap-16"> | ||
<div className="flex-1"> | ||
<div className="flex items-center gap-9 py-4"> | ||
<div className="flex justify-center items-center p-6 drop-shadow-lg rounded-full bg-white"> | ||
<img | ||
width={46} | ||
height={46} | ||
src={university?.logos?.[0] || (ImagePlaceholder as unknown as string)} | ||
alt="logo" | ||
className="max-w-full max-h-40 object-contain" | ||
/> | ||
</div> | ||
|
||
<p className="text-neutral-900 text-lg font-extrabold">{university?.name}</p> | ||
</div> | ||
<p className={`text-neutral-500 text-xs line-clamp-6`}>{university?.topUniInfo?.about}</p> | ||
</div> | ||
<div className="flex-1 flex justify-center"> | ||
<img className="rounded-lg max-w-full object-contain" src={university?.images[0]} alt="university_image" /> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.