Load favicon from local webview assets

This commit is contained in:
MartinBraquet
2025-11-15 15:55:01 +01:00
parent 37ee7752c2
commit cd2c4d3314
7 changed files with 17 additions and 15 deletions

View File

@@ -0,0 +1,13 @@
type FavIconProps = {
className?: string;
};
const FavIcon = ({ className }: FavIconProps) => (
<img
src="favicon.svg"
alt="Compass logo"
className={`w-12 h-12 ${className ?? ""}`}
/>
);
export default FavIcon;

View File

@@ -1,7 +1,7 @@
import Link from 'next/link'
import clsx from 'clsx'
import {Row} from 'web/components/layout/row'
import FavIcon from "web/public/FavIcon";
import FavIcon from "web/components/FavIcon";
import {isProd} from "common/envs/is-prod";
export default function SiteLogo(props: {

View File

@@ -1,6 +1,6 @@
import clsx from 'clsx'
import {useEffect, useRef} from 'react'
import FavIcon from "web/public/FavIcon";
import FavIcon from "web/components/FavIcon";
export type SpinnerSize = 'sm' | 'md' | 'lg'

View File

@@ -7,7 +7,7 @@ import {signupThenMaybeRedirectToSignup} from "web/lib/util/signup"
import {createUserWithEmailAndPassword} from "firebase/auth"
import {auth} from "web/lib/firebase/users"
import FavIcon from "web/public/FavIcon"
import FavIcon from "web/components/FavIcon"
import {PageBase} from "web/components/page-base"
import {getProfileRow} from "common/profiles/profile"
import {db} from "web/lib/supabase/db"

View File

@@ -4,7 +4,6 @@ import {useSearchParams} from "next/navigation"
import React, {Suspense, useEffect, useState} from "react"
import Link from "next/link"
import {auth, firebaseLogin} from "web/lib/firebase/users"
import FavIcon from "web/public/FavIcon"
import {signInWithEmailAndPassword} from "firebase/auth"
import {getProfileRow} from "common/profiles/profile"
@@ -16,6 +15,7 @@ import {PageBase} from "web/components/page-base"
import {GoogleButton} from "web/components/buttons/sign-up-button"
import {SEO} from "web/components/SEO"
import {logger} from "common/logging";
import FavIcon from "web/components/FavIcon";
export default function LoginPage() {
return (

View File

@@ -1,11 +0,0 @@
import Image from "next/image";
type FavIconProps = React.SVGProps<SVGSVGElement>;
const FavIcon: React.FC<FavIconProps> = ({ className }) => (
// Need full domain for favicon to work properly on Webview
<Image src="https://compassmeet.com/favicon.ico" alt="Compass logo" width={500} height={500} className={"w-12 h-12 " + className}/>
);
export default FavIcon;

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 56 KiB