From 5b1862ef2d1a98e1fd4d3ee3e98323f3c8c67ec4 Mon Sep 17 00:00:00 2001 From: Meghan Sardesai Date: Sat, 2 Dec 2023 19:13:14 -0500 Subject: [PATCH] chore(payments-next): reference Mozilla logo in `fxa-react` Because: * `payments-server` and `payments-next` can reference the svg in `fxa-react` and remove image duplication. This commit: * References Mozilla logo in `fxa-react`. * Removes duplicate media. * Removes legacy code. Closes FXA-6309 --- apps/payments/next/app/layout.tsx | 1 + .../src/components/AppLayout/index.tsx | 2 +- .../src/components/Header/index.tsx | 2 +- .../src/images/firefox-logo-combined.svg | 1 - .../src/images/moz-logo-bw-rgb.svg | 21 ------------------- .../src/images/moz-m-logo.svg | 1 - 6 files changed, 3 insertions(+), 25 deletions(-) delete mode 100644 packages/fxa-payments-server/src/images/firefox-logo-combined.svg delete mode 100644 packages/fxa-payments-server/src/images/moz-logo-bw-rgb.svg delete mode 100644 packages/fxa-payments-server/src/images/moz-m-logo.svg diff --git a/apps/payments/next/app/layout.tsx b/apps/payments/next/app/layout.tsx index 184e246673..ff0fc1e639 100644 --- a/apps/payments/next/app/layout.tsx +++ b/apps/payments/next/app/layout.tsx @@ -1,4 +1,5 @@ import Image from 'next/image'; +// TODO - Move shared SVGs to a shared library in fxa/libs/shared/* import mozillaLogo from '../images/moz-logo-bw-rgb.svg'; import './styles/global.css'; diff --git a/packages/fxa-payments-server/src/components/AppLayout/index.tsx b/packages/fxa-payments-server/src/components/AppLayout/index.tsx index 1f2058b788..9bb8d3e60a 100644 --- a/packages/fxa-payments-server/src/components/AppLayout/index.tsx +++ b/packages/fxa-payments-server/src/components/AppLayout/index.tsx @@ -1,6 +1,6 @@ import React, { ReactNode, useEffect, useContext, useState } from 'react'; import { AppContext } from '../../lib/AppContext'; -import logo from '../../images/moz-m-logo.svg'; +import logo from 'fxa-react/images/moz-m-logo.svg'; import { Localized } from '@fluent/react'; import classNames from 'classnames'; diff --git a/packages/fxa-payments-server/src/components/Header/index.tsx b/packages/fxa-payments-server/src/components/Header/index.tsx index 82173a908b..122ba7bee2 100644 --- a/packages/fxa-payments-server/src/components/Header/index.tsx +++ b/packages/fxa-payments-server/src/components/Header/index.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Profile } from '../../store/types'; -import mozillaLogo from '../../images/moz-logo-bw-rgb.svg'; +import mozillaLogo from 'fxa-react/images/moz-m-logo.svg'; import { useLocalization } from '@fluent/react'; export type HeaderProps = { diff --git a/packages/fxa-payments-server/src/images/firefox-logo-combined.svg b/packages/fxa-payments-server/src/images/firefox-logo-combined.svg deleted file mode 100644 index 5ef1b04fe4..0000000000 --- a/packages/fxa-payments-server/src/images/firefox-logo-combined.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/fxa-payments-server/src/images/moz-logo-bw-rgb.svg b/packages/fxa-payments-server/src/images/moz-logo-bw-rgb.svg deleted file mode 100644 index 823e1e69d5..0000000000 --- a/packages/fxa-payments-server/src/images/moz-logo-bw-rgb.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - diff --git a/packages/fxa-payments-server/src/images/moz-m-logo.svg b/packages/fxa-payments-server/src/images/moz-m-logo.svg deleted file mode 100644 index d32ebd2b93..0000000000 --- a/packages/fxa-payments-server/src/images/moz-m-logo.svg +++ /dev/null @@ -1 +0,0 @@ -