Skip to content

Commit

Permalink
Migrate: next/legacy/image -> next/image (#911)
Browse files Browse the repository at this point in the history
Migrated All next/legacy/image instances to next/image succesfully as per the docs

Co-authored-by: Kylee Fields <43586156+kyleecodes@users.noreply.github.com>
  • Loading branch information
anmol-fzr and kyleecodes committed May 19, 2024
1 parent 2f91449 commit 1aaf5c4
Show file tree
Hide file tree
Showing 28 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion components/cards/CourseCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from '@mui/material';
import { ISbStoryData } from '@storyblok/react';
import { useTranslations } from 'next-intl';
import Image from 'next/legacy/image';
import Image from 'next/image';
import { useRouter } from 'next/router';
import { useState } from 'react';
import { PROGRESS_STATUS } from '../../constants/enums';
Expand Down
2 changes: 1 addition & 1 deletion components/common/ContentUnavailable.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Container, Typography } from '@mui/material';
import { useTranslations } from 'next-intl';
import Image from 'next/legacy/image';
import Image from 'next/image';
import illustrationPerson4Peach from '../../public/illustration_person4_peach.svg';
import { columnStyle } from '../../styles/common';
import { TextNode } from '../../utils/helper-types/translations';
Expand Down
2 changes: 1 addition & 1 deletion components/common/ImageTextColumn.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Typography } from '@mui/material';
import { useTranslations } from 'next-intl';
import Image, { StaticImageData } from 'next/legacy/image';
import Image, { StaticImageData } from 'next/image';

export interface ImageTextItem {
text: string;
Expand Down
2 changes: 1 addition & 1 deletion components/common/ImageTextGrid.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Typography } from '@mui/material';
import { useTranslations } from 'next-intl';
import Image, { StaticImageData } from 'next/legacy/image';
import Image, { StaticImageData } from 'next/image';
import { richtextContentStyle, rowStyle } from '../../styles/common';

export interface ImageTextItem {
Expand Down
2 changes: 1 addition & 1 deletion components/layout/Consent.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getAnalytics } from '@firebase/analytics';
import { Box, Button, alpha, useMediaQuery, useTheme } from '@mui/material';
import { useTranslations } from 'next-intl';
import Image from 'next/legacy/image';
import Image from 'next/image';
import React from 'react';
import CookieConsent from 'react-cookie-consent';
import { COOKIES_ACCEPTED, COOKIES_REJECTED } from '../../constants/events';
Expand Down
2 changes: 1 addition & 1 deletion components/layout/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import TwitterIcon from '@mui/icons-material/Twitter';
import YoutubeIcon from '@mui/icons-material/YouTube';
import { Box, Container, IconButton, Typography } from '@mui/material';
import { useTranslations } from 'next-intl';
import Image from 'next/legacy/image';
import Image from 'next/image';
import { useRouter } from 'next/router';
import { useEffect, useState } from 'react';
import { PARTNER_SOCIAL_LINK_CLICKED, SOCIAL_LINK_CLICKED } from '../../constants/events';
Expand Down
2 changes: 1 addition & 1 deletion components/layout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import KeyboardArrowLeftIcon from '@mui/icons-material/KeyboardArrowLeft';
import { Box, Container, IconButton, Typography } from '@mui/material';
import { ISbRichtext } from '@storyblok/react';
import { useTranslations } from 'next-intl';
import Image, { StaticImageData } from 'next/legacy/image';
import Image, { StaticImageData } from 'next/image';
import { useRouter } from 'next/router';
import { JSXElementConstructor, ReactElement, ReactNodeArray } from 'react';
import { render } from 'storyblok-rich-text-react-renderer';
Expand Down
2 changes: 1 addition & 1 deletion components/layout/HomeHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Box from '@mui/material/Box';
import Container from '@mui/material/Container';
import Typography from '@mui/material/Typography';
import { useTranslations } from 'next-intl';
import Image, { StaticImageData } from 'next/legacy/image';
import Image, { StaticImageData } from 'next/image';
import * as React from 'react';
import { render } from 'storyblok-rich-text-react-renderer';
import { columnStyle, rowStyle } from '../../styles/common';
Expand Down
2 changes: 1 addition & 1 deletion components/layout/PartnerAdminHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Container, Typography } from '@mui/material';
import { useTranslations } from 'next-intl';
import Image, { StaticImageData } from 'next/legacy/image';
import Image, { StaticImageData } from 'next/image';
import * as React from 'react';

const headerContainerStyles = {
Expand Down
2 changes: 1 addition & 1 deletion components/layout/PartnerHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Container } from '@mui/material';
import { useTranslations } from 'next-intl';
import Image, { StaticImageData } from 'next/legacy/image';
import Image, { StaticImageData } from 'next/image';
import { rowStyle } from '../../styles/common';
import UserResearchBanner from '../banner/UserResearchBanner';

Expand Down
2 changes: 1 addition & 1 deletion components/layout/SecondaryNav.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Icon, Tab, Tabs } from '@mui/material';
import Image from 'next/legacy/image';
import Image from 'next/image';
import { useRouter } from 'next/router';
import notesFromBloomIcon from '../../public/notes_from_bloom_icon.svg';
import therapyIcon from '../../public/therapy_icon.svg';
Expand Down
2 changes: 1 addition & 1 deletion components/layout/TopBar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AppBar, Box, Button, Container, Theme, useMediaQuery, useTheme } from '@mui/material';
import { useTranslations } from 'next-intl';
import Image from 'next/legacy/image';
import Image from 'next/image';
import { useRouter } from 'next/router';
import { useEffect, useState } from 'react';
import { HEADER_HOME_LOGO_CLICKED, HEADER_LOGIN_CLICKED } from '../../constants/events';
Expand Down
2 changes: 1 addition & 1 deletion components/storyblok/StoryblokAccordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
Typography,
} from '@mui/material';
import { storyblokEditable } from '@storyblok/react';
import Image from 'next/legacy/image';
import Image from 'next/image';
import { render } from 'storyblok-rich-text-react-renderer';
import { ACCORDION_OPENED, generateAccordionEvent } from '../../constants/events';
import logEvent from '../../utils/logEvent';
Expand Down
2 changes: 1 addition & 1 deletion components/storyblok/StoryblokCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import { Box } from '@mui/system';
import { ISbRichtext, storyblokEditable } from '@storyblok/react';
import { useTranslations } from 'next-intl';
import Image from 'next/legacy/image';
import Image from 'next/image';
import { useState } from 'react';
import { render } from 'storyblok-rich-text-react-renderer';
import { RichTextOptions } from '../../utils/richText';
Expand Down
2 changes: 1 addition & 1 deletion components/storyblok/StoryblokFaqs.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import { Accordion, AccordionDetails, AccordionSummary, Box, Typography } from '@mui/material';
import { ISbRichtext, storyblokEditable } from '@storyblok/react';
import Image from 'next/legacy/image';
import Image from 'next/image';
import { render } from 'storyblok-rich-text-react-renderer';
import { FAQ_OPENED } from '../../constants/events';
import illustrationLeafMix from '../../public/illustration_leaf_mix.svg';
Expand Down
2 changes: 1 addition & 1 deletion components/storyblok/StoryblokImage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box } from '@mui/system';
import { storyblokEditable } from '@storyblok/react';
import Image from 'next/legacy/image';
import Image from 'next/image';
import { richtextContentStyle } from '../../styles/common';

interface StoryblokImageProps {
Expand Down
2 changes: 1 addition & 1 deletion components/storyblok/StoryblokTeamMemberCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import LanguageIcon from '@mui/icons-material/Language';
import { Box, Card, CardActionArea, CardContent, Collapse, Typography } from '@mui/material';
import { ISbRichtext, storyblokEditable } from '@storyblok/react';
import { useTranslations } from 'next-intl';
import Image from 'next/legacy/image';
import Image from 'next/image';
import { useState } from 'react';
import { render } from 'storyblok-rich-text-react-renderer';
import { columnStyle, rowStyle } from '../../styles/common';
Expand Down
2 changes: 1 addition & 1 deletion constants/partners.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { StaticImageData } from 'next/legacy/image';
import { StaticImageData } from 'next/image';
import badooLogo from '../public/badoo_logo.svg';
import bloomBadooLogo from '../public/bloom_badoo_logo.svg';
import bloomBumbleLogo from '../public/bloom_bumble_logo.svg';
Expand Down
2 changes: 1 addition & 1 deletion guards/partnerAdminGuard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Container, Typography } from '@mui/material';
import { Box } from '@mui/system';
import Head from 'next/head';
import Image from 'next/legacy/image';
import Image from 'next/image';
import { useTranslations } from 'use-intl';
import Link from '../components/common/Link';
import { useTypedSelector } from '../hooks/store';
Expand Down
2 changes: 1 addition & 1 deletion guards/superAdminGuard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Container, Typography } from '@mui/material';
import { Box } from '@mui/system';
import Head from 'next/head';
import Image from 'next/legacy/image';
import Image from 'next/image';
import { useTranslations } from 'use-intl';
import Link from '../components/common/Link';
import { useTypedSelector } from '../hooks/store';
Expand Down
2 changes: 1 addition & 1 deletion guards/therapyAccessGuard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Container, Typography } from '@mui/material';
import { Box } from '@mui/system';
import Head from 'next/head';
import Image from 'next/legacy/image';
import Image from 'next/image';
import { useTranslations } from 'use-intl';
import Link from '../components/common/Link';
import { useTypedSelector } from '../hooks/store';
Expand Down
2 changes: 1 addition & 1 deletion pages/404.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Button, Container, Typography } from '@mui/material';
import { Box } from '@mui/system';
import { GetStaticPropsContext, NextPage } from 'next';
import Head from 'next/head';
import Image from 'next/legacy/image';
import Image from 'next/image';
import { useTranslations } from 'use-intl';
import Link from '../components/common/Link';
import LoadingContainer from '../components/common/LoadingContainer';
Expand Down
2 changes: 1 addition & 1 deletion pages/500.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Button, Container, Typography } from '@mui/material';
import { Box } from '@mui/system';
import { GetStaticPropsContext, NextPage } from 'next';
import Head from 'next/head';
import Image from 'next/legacy/image';
import Image from 'next/image';
import { useTranslations } from 'use-intl';
import Link from '../components/common/Link';
import LoadingContainer from '../components/common/LoadingContainer';
Expand Down
2 changes: 1 addition & 1 deletion pages/account/apply-a-code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Box, Card, CardContent, Container, Typography } from '@mui/material';
import { GetStaticPropsContext, NextPage } from 'next';
import { useTranslations } from 'next-intl';
import Head from 'next/head';
import Image from 'next/legacy/image';
import Image from 'next/image';
import { useEffect, useState } from 'react';
import Link from '../../components/common/Link';
import ApplyCodeForm from '../../components/forms/ApplyCodeForm';
Expand Down
2 changes: 1 addition & 1 deletion pages/auth/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type { NextPage } from 'next';
import { GetStaticPropsContext } from 'next';
import { useTranslations } from 'next-intl';
import Head from 'next/head';
import Image from 'next/legacy/image';
import Image from 'next/image';
import { useRouter } from 'next/router';
import { useEffect } from 'react';
import Link from '../../components/common/Link';
Expand Down
2 changes: 1 addition & 1 deletion pages/auth/register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type { NextPage } from 'next';
import { GetStaticPropsContext } from 'next';
import { useTranslations } from 'next-intl';
import Head from 'next/head';
import Image from 'next/legacy/image';
import Image from 'next/image';
import { useRouter } from 'next/router';
import { useEffect, useState } from 'react';
import Link from '../../components/common/Link';
Expand Down
2 changes: 1 addition & 1 deletion pages/therapy/book-session.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Box, Button, Container, Typography } from '@mui/material';
import { GetStaticPropsContext, NextPage } from 'next';
import { useTranslations } from 'next-intl';
import Head from 'next/head';
import Image from 'next/legacy/image';
import Image from 'next/image';
import Script from 'next/script';
import { useEffect, useState } from 'react';
import { PartnerAccess } from '../../app/partnerAccessSlice';
Expand Down
2 changes: 1 addition & 1 deletion pages/therapy/confirmed-session.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Box, Container, Typography } from '@mui/material';
import { GetStaticPropsContext, NextPage } from 'next';
import { useTranslations } from 'next-intl';
import Head from 'next/head';
import Image from 'next/legacy/image';
import Image from 'next/image';
import { useEffect, useState } from 'react';
import { PartnerAccess } from '../../app/partnerAccessSlice';
import Faqs from '../../components/common/Faqs';
Expand Down

0 comments on commit 1aaf5c4

Please sign in to comment.