Logoya Url prop eklendi
This commit is contained in:
parent
e4ea0171fa
commit
8a65a6cd82
5 changed files with 18 additions and 7 deletions
|
|
@ -5,6 +5,7 @@ import type { CommonProps } from '@/proxy/common'
|
|||
import type { ReactNode, ReactElement } from 'react'
|
||||
import { Avatar } from '@/components/ui'
|
||||
import { useLocalization } from '@/utils/hooks/useLocalization'
|
||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||
|
||||
interface CoverProps extends CommonProps {
|
||||
content?: ReactNode
|
||||
|
|
@ -25,7 +26,7 @@ const Cover = ({ children, content, ...rest }: CoverProps) => {
|
|||
<div className="absolute inset-0 bg-black bg-opacity-50 z-0"></div>
|
||||
|
||||
<div className="relative z-10 flex flex-col h-full justify-between">
|
||||
<Logo mode="dark" />
|
||||
<Logo mode="dark" url={ROUTES_ENUM.authenticated.login} />
|
||||
<div>
|
||||
<div className="mb-6 flex items-center gap-4">
|
||||
<Avatar className="border-2 border-white" shape="circle" src="/img/others/cto.png" />
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import Logo from '@/components/template/Logo'
|
|||
import { APP_NAME } from '@/constants/app.constant'
|
||||
import type { CommonProps } from '@/proxy/common'
|
||||
import { useLocalization } from '@/utils/hooks/useLocalization'
|
||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||
|
||||
interface SideProps extends CommonProps {
|
||||
content?: React.ReactNode
|
||||
|
|
@ -22,7 +23,7 @@ const Side = ({ children, content, ...rest }: SideProps) => {
|
|||
>
|
||||
<div className="absolute inset-0 bg-black bg-opacity-50 z-0"></div>
|
||||
<div className="relative z-10 flex flex-col h-full justify-between">
|
||||
<Logo className="drop-shadow-md" />
|
||||
<Logo className="drop-shadow-md" url={ROUTES_ENUM.authenticated.login} />
|
||||
<div>
|
||||
<div className="mb-6 flex items-center gap-4">
|
||||
<Avatar className="border-2 border-white" shape="circle" src="/img/others/cto.png" />
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ const Simple = ({ children, content, ...rest }: SimpleProps) => {
|
|||
</div>
|
||||
|
||||
<div className="text-center">
|
||||
<Logo type="streamline" imgClass="mx-auto" />
|
||||
<Logo type="streamline" imgClass="mx-auto" url={ROUTES_ENUM.authenticated.login} />
|
||||
</div>
|
||||
|
||||
<div className="text-center">
|
||||
|
|
|
|||
|
|
@ -10,12 +10,21 @@ interface LogoProps extends CommonProps {
|
|||
mode?: Mode
|
||||
imgClass?: string
|
||||
logoWidth?: number | string
|
||||
url?: string
|
||||
}
|
||||
|
||||
const LOGO_SRC_PATH = '/img/logo/'
|
||||
|
||||
const Logo = (props: LogoProps) => {
|
||||
const { type = 'full', mode = 'light', className, imgClass, style, logoWidth = 'auto' } = props
|
||||
const {
|
||||
type = 'full',
|
||||
mode = 'light',
|
||||
className,
|
||||
imgClass,
|
||||
style,
|
||||
logoWidth = 'auto',
|
||||
url = ROUTES_ENUM.protected.dashboard,
|
||||
} = props
|
||||
|
||||
return (
|
||||
<div
|
||||
|
|
@ -25,7 +34,7 @@ const Logo = (props: LogoProps) => {
|
|||
...{ width: logoWidth },
|
||||
}}
|
||||
>
|
||||
<Link to={ROUTES_ENUM.protected.dashboard}>
|
||||
<Link to={url}>
|
||||
<img
|
||||
className={imgClass}
|
||||
src={`${LOGO_SRC_PATH}logo-${mode}-${type}.png`}
|
||||
|
|
|
|||
Loading…
Reference in a new issue