Skip to content

Commit

Permalink
When src changes, completely reload the component
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanoverna committed Sep 23, 2024
1 parent 7cbedfb commit 3486876
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/Image/__tests__/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ exports[`Image explicit sizes renders correctly 1`] = `
sizes="(max-width: 600px) 200px, 50vw"
>
<div
key="https://www.datocms-assets.com/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"maxWidth": 750,
Expand Down Expand Up @@ -105,6 +106,7 @@ exports[`Image layout=fill not visible renders the blur-up thumb 1`] = `
layout="fill"
>
<div
key="https://www.datocms-assets.com/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"height": "100%",
Expand Down Expand Up @@ -164,6 +166,7 @@ exports[`Image layout=fill visible image loaded shows the image 1`] = `
layout="fill"
>
<div
key="https://www.datocms-assets.com/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"height": "100%",
Expand Down Expand Up @@ -245,6 +248,7 @@ exports[`Image layout=fill visible renders the image (minimal data) 1`] = `
layout="fill"
>
<div
key="https://www.datocms-assets.com/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"height": "100%",
Expand Down Expand Up @@ -324,6 +328,7 @@ exports[`Image layout=fill visible renders the image (relative URL) 1`] = `
layout="fill"
>
<div
key="/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"height": "100%",
Expand Down Expand Up @@ -408,6 +413,7 @@ exports[`Image layout=fill visible renders the image 1`] = `
layout="fill"
>
<div
key="https://www.datocms-assets.com/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"height": "100%",
Expand Down Expand Up @@ -494,6 +500,7 @@ exports[`Image layout=fixed not visible renders the blur-up thumb 1`] = `
layout="fixed"
>
<div
key="https://www.datocms-assets.com/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"overflow": "hidden",
Expand Down Expand Up @@ -559,6 +566,7 @@ exports[`Image layout=fixed visible image loaded shows the image 1`] = `
layout="fixed"
>
<div
key="https://www.datocms-assets.com/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"overflow": "hidden",
Expand Down Expand Up @@ -646,6 +654,7 @@ exports[`Image layout=fixed visible renders the image (minimal data) 1`] = `
layout="fixed"
>
<div
key="https://www.datocms-assets.com/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"overflow": "hidden",
Expand Down Expand Up @@ -731,6 +740,7 @@ exports[`Image layout=fixed visible renders the image (relative URL) 1`] = `
layout="fixed"
>
<div
key="/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"overflow": "hidden",
Expand Down Expand Up @@ -821,6 +831,7 @@ exports[`Image layout=fixed visible renders the image 1`] = `
layout="fixed"
>
<div
key="https://www.datocms-assets.com/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"overflow": "hidden",
Expand Down Expand Up @@ -913,6 +924,7 @@ exports[`Image layout=intrinsic not visible renders the blur-up thumb 1`] = `
layout="intrinsic"
>
<div
key="https://www.datocms-assets.com/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"maxWidth": 750,
Expand Down Expand Up @@ -979,6 +991,7 @@ exports[`Image layout=intrinsic visible image loaded shows the image 1`] = `
layout="intrinsic"
>
<div
key="https://www.datocms-assets.com/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"maxWidth": 750,
Expand Down Expand Up @@ -1067,6 +1080,7 @@ exports[`Image layout=intrinsic visible renders the image (minimal data) 1`] = `
layout="intrinsic"
>
<div
key="https://www.datocms-assets.com/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"maxWidth": 750,
Expand Down Expand Up @@ -1153,6 +1167,7 @@ exports[`Image layout=intrinsic visible renders the image (relative URL) 1`] = `
layout="intrinsic"
>
<div
key="/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"maxWidth": 750,
Expand Down Expand Up @@ -1244,6 +1259,7 @@ exports[`Image layout=intrinsic visible renders the image 1`] = `
layout="intrinsic"
>
<div
key="https://www.datocms-assets.com/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"maxWidth": 750,
Expand Down Expand Up @@ -1337,6 +1353,7 @@ exports[`Image layout=responsive not visible renders the blur-up thumb 1`] = `
layout="responsive"
>
<div
key="https://www.datocms-assets.com/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"overflow": "hidden",
Expand Down Expand Up @@ -1402,6 +1419,7 @@ exports[`Image layout=responsive visible image loaded shows the image 1`] = `
layout="responsive"
>
<div
key="https://www.datocms-assets.com/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"overflow": "hidden",
Expand Down Expand Up @@ -1489,6 +1507,7 @@ exports[`Image layout=responsive visible renders the image (minimal data) 1`] =
layout="responsive"
>
<div
key="https://www.datocms-assets.com/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"overflow": "hidden",
Expand Down Expand Up @@ -1574,6 +1593,7 @@ exports[`Image layout=responsive visible renders the image (relative URL) 1`] =
layout="responsive"
>
<div
key="/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"overflow": "hidden",
Expand Down Expand Up @@ -1664,6 +1684,7 @@ exports[`Image layout=responsive visible renders the image 1`] = `
layout="responsive"
>
<div
key="https://www.datocms-assets.com/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"overflow": "hidden",
Expand Down Expand Up @@ -1774,6 +1795,7 @@ exports[`Image passing className and/or style renders correctly 1`] = `
>
<div
className="class-name"
key="https://www.datocms-assets.com/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"border": "1px solid red",
Expand Down Expand Up @@ -1880,6 +1902,7 @@ exports[`Image priority=true renders correctly 1`] = `
priority={true}
>
<div
key="https://www.datocms-assets.com/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"maxWidth": 750,
Expand Down Expand Up @@ -1966,6 +1989,7 @@ exports[`Image usePlaceholder=false renders correctly 1`] = `
usePlaceholder={false}
>
<div
key="https://www.datocms-assets.com/205/image.png?ar=16%3A9&fit=crop&w=750"
style={
{
"maxWidth": 750,
Expand Down

0 comments on commit 3486876

Please sign in to comment.