HEX
Server: LiteSpeed
System: Linux server902.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: deshuvsd (2181)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/deshuvsd/www/wp-content/plugins/surerank/src/apps/admin-components/logo.js
import { isEqualQueryParamValue } from '@/functions/utils';
import { SureRankLogo } from '@/global/components/icons';
import { Link } from '@tanstack/react-router';
import { useMemo } from '@wordpress/element';
import { __ } from '@wordpress/i18n';

const Logo = () => {
	const linkClassName =
		'inline-flex no-underline hover:no-underline focus:no-underline focus:[box-shadow:none] cursor-pointer';
	const renderLogo = useMemo( () => <SureRankLogo className="size-6" />, [] );

	return isEqualQueryParamValue( 'page', 'surerank_settings' ) ? (
		<a
			href={ `${ surerank_globals.wp_dashboard_url }?page=surerank#/dashboard` }
			className={ linkClassName }
			aria-label={ __( 'SureRank Dashboard', 'surerank' ) }
		>
			{ renderLogo }
		</a>
	) : (
		<Link
			to="/dashboard"
			className={ linkClassName }
			aria-label={ __( 'SureRank Dashboard', 'surerank' ) }
		>
			{ renderLogo }
		</Link>
	);
};

export default Logo;