chore: refactor frontend components folder

This commit is contained in:
swve 2024-11-25 23:26:33 +01:00
parent 46f016f661
commit 5a746a946d
106 changed files with 159 additions and 164 deletions

View file

@ -0,0 +1,27 @@
import Image from 'next/image'
import CoursesLogo from 'public/svg/courses.svg'
import CollectionsLogo from 'public/svg/collections.svg'
import TrailLogo from 'public/svg/trail.svg'
function TypeOfContentTitle(props: { title: string; type: string }) {
function getLogo() {
if (props.type == 'col') {
return CollectionsLogo
} else if (props.type == 'cou') {
return CoursesLogo
} else if (props.type == 'tra') {
return TrailLogo
}
}
return (
<div className="home_category_title flex my-5 items-center">
<div className="ml-2 rounded-full ring-1 ring-slate-900/5 shadow-inner p-2 my-auto mr-4">
<Image unoptimized className="" src={getLogo()} alt="Courses logo" />
</div>
<h1 className="font-bold text-2xl">{props.title}</h1>
</div>
)
}
export default TypeOfContentTitle