Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

Minor refactor #48

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions starter/components/elements/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PropTypes from "prop-types"
import { mediaPropTypes } from "utils/types"

const NextImage = ({ media, ...props }) => {
const { url, alternativeText } = media
const { url, alternativeText = "" } = media

const loader = ({ src }) => {
return getStrapiMedia(src)
Expand All @@ -13,7 +13,7 @@ const NextImage = ({ media, ...props }) => {
// The image has a fixed width and height
if (props.width && props.height) {
return (
<Image loader={loader} src={url} alt={alternativeText || ""} {...props} />
<Image loader={loader} src={url} alt={alternativeText} {...props} />
)
}

Expand All @@ -26,7 +26,7 @@ const NextImage = ({ media, ...props }) => {
height={media.height}
objectFit="contain"
src={url}
alt={alternativeText || ""}
alt={alternativeText}
/>
)
}
Expand Down
2 changes: 1 addition & 1 deletion starter/components/icons/world.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const WorldIcon = () => {
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 490 490"
>
<path d="M490 245C490 109.915 380.089 0 245 0S0 109.915 0 245c0 135.085 109.911 245 245 245s245-109.915 245-245zM263.846 380.696c11.096.548 21.781 1.361 31.996 2.43-11.076 17.053-22.316 31.807-31.996 43.387v-45.817zm0-38.711v-81.591h80.86c-4.208 31.012-14.804 60.245-27.914 86.267-16.352-2.171-34.078-3.82-52.946-4.676zm0-119.946v-80.36c19.587-.4 39.945-1.888 60.783-4.753 11.631 24.771 20.063 53.417 21.66 85.113h-82.443zm0-118.966v-51.29c11.357 11.26 26.119 27.703 40.158 48.699-13.635 1.373-27.106 2.33-40.158 2.591zm-37.692-.673c-16.318-.805-31.757-2.205-46.078-4.046 16.965-24.888 34.774-43.291 46.078-53.774v57.82zm0 38.825v80.815h-89.986c1.658-32.662 10.587-62.206 22.834-87.553a619.247 619.247 0 0067.152 6.738zm0 119.17v81.003c-19.581.4-39.939 1.851-60.768 4.712-12.983-25.886-23.46-54.922-27.638-85.716h88.406zm0 119.628v55.272c-11.131-12.632-25.648-30.714-39.886-52.708 13.541-1.356 26.922-2.304 39.886-2.564zm111.038 8.844c18.508 3.238 34.063 6.762 45.881 9.837-23.907 21.36-52.737 37.222-84.641 45.727 12.172-15.038 25.844-33.717 38.76-55.564zm18.791-35.812c12.927-28.029 23.045-59.309 26.832-92.66h68.71c-2.959 39.704-17.194 76.236-39.557 106.571-10.45-3.268-29.932-8.767-55.985-13.911zm28.019-131.016c-1.427-34.133-9.499-64.953-20.987-91.989a444.866 444.866 0 0044.872-12.453c23.245 29.466 38.694 65.279 43.062 104.441h-66.947zM345.135 94.558a341.42 341.42 0 00-30.991-44.13c23.562 8.348 45.226 20.672 64.008 36.41-11.037 3.104-22.05 5.585-33.017 7.72zm-206.091-2.866c-9.782-1.944-18.654-3.915-26.181-5.776a207.72 207.72 0 0152.147-31.524c-8.691 10.813-17.559 23.385-25.966 37.3zM120.62 127.3c-12.104 27.687-20.691 59.444-22.168 94.739H39.051c4.376-39.236 19.87-75.112 43.187-104.609 8.84 2.654 21.899 6.232 38.382 9.87zM99.638 260.395c3.796 33.422 13.951 64.76 26.918 92.833-16.081 3.579-32.278 8.175-48.492 13.78-22.381-30.344-36.629-66.891-39.589-106.614h61.163zm45.423 128.115c12.212 20.697 25.116 38.605 36.803 53.259-28.391-9.075-54.009-24.2-75.627-43.689 12.978-3.859 25.933-7.066 38.824-9.57z" />
<path d="M490 245C490 110 380 0 245 0S0 110 0 245s110 245 245 245 245-110 245-245zM263.8 380.7c11.1.5 21.8 1.4 32 2.4-11 17-22.3 31.8-32 43.4v-45.8zm0-38.7v-81.6h81c-4.3 31-14.9 60.2-28 86.3-16.4-2.2-34-3.9-53-4.7zm0-120v-80.3c19.6-.4 40-2 60.8-4.8 11.7 24.8 20 53.4 21.7 85.1h-82.5zm0-119V51.9a318.9 318.9 0 0140.2 48.7 503.6 503.6 0 01-40.2 2.6zm-37.6-.6c-16.4-.8-31.8-2.2-46.1-4 17-25 34.8-43.3 46-53.8v57.8zm0 38.8V222h-90a227.7 227.7 0 0122.8-87.5 619.2 619.2 0 0067.2 6.7zm0 119.2v81c-19.6.4-40 1.8-60.8 4.7-13-25.9-23.5-55-27.7-85.7h88.5zm0 119.6v55.3a454.6 454.6 0 01-40-52.7 504 504 0 0140-2.6zm111 8.9c18.5 3.2 34 6.7 45.9 9.8a207 207 0 01-84.7 45.7c12.2-15 25.9-33.7 38.8-55.5zM356 353c13-28 23-59.4 26.8-92.7h68.7c-3 39.7-17.2 76.2-39.5 106.6-10.5-3.3-30-8.8-56-14zm28-131c-1.4-34.2-9.5-65-21-92a444.9 444.9 0 0044.9-12.5 205.1 205.1 0 0143 104.4H384zM345.1 94.5a341.4 341.4 0 00-31-44.2 207.4 207.4 0 0164 36.4c-11 3.1-22 5.6-33 7.8zm-206-3c-9.8-1.9-18.7-3.8-26.2-5.7A207.7 207.7 0 01165 54.4a343.2 343.2 0 00-26 37.3zm-18.5 35.7A263 263 0 0098.5 222H39a205.1 205.1 0 0143.1-104.6c8.9 2.7 22 6.3 38.4 9.9zm-21 133c3.8 33.5 14 64.9 27 93-16.1 3.5-32.3 8.1-48.5 13.7a204.8 204.8 0 01-39.6-106.6h61.1zm45.5 128.2a464 464 0 0036.8 53.3c-28.4-9.1-54-24.2-75.7-43.7 13-3.9 26-7 38.9-9.6z"/>
</svg>
</div>
)
Expand Down