26 lines
722 B
TypeScript
26 lines
722 B
TypeScript
import React from 'react'
|
|
import Loading from '@/components/shared/Loading'
|
|
import navigationIcon from '@/proxy/menus/navigation-icon.config'
|
|
|
|
interface PageIconProps {
|
|
name?: string
|
|
className?: string
|
|
size?: number
|
|
}
|
|
|
|
/** Ikon anahtari tanimli degilse hicbir sey render etmez. */
|
|
export const PageIcon: React.FC<PageIconProps> = ({ name, className, size }) => {
|
|
const IconComponent = name ? navigationIcon[name] : undefined
|
|
|
|
if (!IconComponent) {
|
|
return null
|
|
}
|
|
|
|
return <IconComponent className={className} size={size} />
|
|
}
|
|
|
|
export const PublicPageLoader: React.FC = () => (
|
|
<div className="flex min-h-screen items-center justify-center bg-gray-50 dark:bg-gray-950">
|
|
<Loading loading />
|
|
</div>
|
|
)
|