1
0
forked from Kieran/snort

no navLogo for snort

This commit is contained in:
Martti Malmi 2023-11-27 16:30:20 +02:00
parent 09dd97111a
commit e184a96dc9
3 changed files with 9 additions and 3 deletions

View File

@ -6,7 +6,7 @@
"nip05Domain": "snort.social", "nip05Domain": "snort.social",
"favicon": "public/favicon.ico", "favicon": "public/favicon.ico",
"appleTouchIconUrl": "/nostrich_512.png", "appleTouchIconUrl": "/nostrich_512.png",
"navLogo": "/nostrich_256.png", "navLogo": null,
"publicDir": "public/snort", "publicDir": "public/snort",
"httpCache": "", "httpCache": "",
"animalNamePlaceholders": false, "animalNamePlaceholders": false,

View File

@ -48,7 +48,7 @@ declare const CONFIG: {
nip05Domain: string; nip05Domain: string;
favicon: string; favicon: string;
appleTouchIconUrl: string; appleTouchIconUrl: string;
navLogo: string; navLogo: string | null;
httpCache: string; httpCache: string;
animalNamePlaceholders: boolean; animalNamePlaceholders: boolean;
defaultZapPoolFee?: number; defaultZapPoolFee?: number;

View File

@ -3,6 +3,7 @@ import { getCurrentSubscription } from "../../Subscription";
import { isChristmas, isHalloween, isStPatricksDay } from "../../SnortUtils"; import { isChristmas, isHalloween, isStPatricksDay } from "../../SnortUtils";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import { mapPlanName } from "../subscribe"; import { mapPlanName } from "../subscribe";
import Icon from "@/Icons/Icon";
export function LogoHeader({ showText = false }) { export function LogoHeader({ showText = false }) {
const { subscriptions } = useLogin(); const { subscriptions } = useLogin();
const currentSubscription = getCurrentSubscription(subscriptions); const currentSubscription = getCurrentSubscription(subscriptions);
@ -20,7 +21,12 @@ export function LogoHeader({ showText = false }) {
return ( return (
<Link to="/" className="logo" onClick={handleLogoClick}> <Link to="/" className="logo" onClick={handleLogoClick}>
<h1 className="flex flex-row items-center"> <h1 className="flex flex-row items-center">
<img src={CONFIG.navLogo} className="w-8" /> {CONFIG.navLogo && <img src={CONFIG.navLogo} className="w-8" />}
{!CONFIG.navLogo && (
<span className="text-2xl p-5 hidden md:flex xl:hidden w-8 h-8 rounded-xl bg-dark text-xl font-bold flex items-center justify-center">
{CONFIG.appName[0]}
</span>
)}
{showText && ( {showText && (
<div className="md:hidden xl:inline ml-2"> <div className="md:hidden xl:inline ml-2">
{extra()} {extra()}