Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .changeset/seven-olives-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"status.app": patch
---

chore: reduce cloudinary usage
1 change: 1 addition & 0 deletions apps/portfolio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"format": "prettier --write .",
"typecheck": "tsc",
"env:check": "node -r dotenv/config ./src/config/env.server.mjs dotenv_config_path=./.env && node -r dotenv/config ./src/config/env.client.mjs dotenv_config_path=./.env && :",
"sync:cloudinary": "DOTENV_CONFIG_PATH='.env.local' node -r dotenv/config scripts/generate-cloudinary-type.mjs && prettier -w 'src/app/_components/assets/types.ts'",
"clean": "rimraf .next .vercel/output node_modules .turbo"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ const fetchResources = async url => {
{
headers: {
Authorization: `Basic ${btoa(
`${env.data.CLOUDINARY_API_KEY}:${env.data.CLOUDINARY_API_SECRET}`,
`${env.data.CLOUDINARY_API_KEY}:${env.data.CLOUDINARY_API_SECRET}`
)}`,
},
},
}
)

const { resources, next_cursor } = await response.json()
Expand All @@ -46,7 +46,7 @@ const fetchResources = async url => {
nextCursor = next_cursor
} else {
console.warn(
'Empty or undefined response received. Consider running the script again.',
'Empty or undefined response received. Consider running the script again.'
)
break
}
Expand All @@ -56,19 +56,19 @@ const fetchResources = async url => {
}

const [images, videos, zipFiles] = await Promise.all(
RESOURCE_URLS.map(async url => fetchResources(url)),
RESOURCE_URLS.map(async url => fetchResources(url))
)

fs.writeFile(
'src/components/image/types.ts',
'src/app/_components/assets/types.ts',
`
export type ImageType =
${images
.map(
i =>
`{ id: '${i.public_id}:${i.width}:${i.height}', alt: "${
i.context?.custom?.alt ?? ''
}" }`,
}" }`
)
.join(' | ')}

Expand All @@ -85,5 +85,5 @@ export type VideoId = ${[...videos]
.map(z => `'${z.public_id}'`)
.sort()
.join(' | ')}
`,
`
)
1,076 changes: 46 additions & 1,030 deletions apps/portfolio/src/app/_components/assets/types.ts

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions apps/status.app/src/app/(website)/_components/hands-section.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Text } from '@status-im/components'

import { Icon, Video } from '~components/assets'
import { Icon, Image } from '~components/assets'

import type { ImageId } from '~components/assets'

Expand All @@ -9,18 +9,18 @@ const HandsSection = () => {
<div className="relative z-20 bg-white-100">
<div className="container-lg relative pb-24 pt-40 xl:pb-40 xl:pt-20">
<div className="relative grid aspect-[0.44] place-content-center 2md:aspect-[1.715]">
{/* MOBILE VIDEO */}
<div className="absolute -inset-x-6 top-10 scale-[1.7] sm:scale-150 2md:hidden">
<Video
id="Non Beta Release/Animations/Wallet_01_Mobile:990:1467"
posterId="Non Beta Release/Animations/Frames/Wallet_01_Mobile_Frame:990:1467"
<Image
id="Non Beta Release/Animations/Frames/Wallet_01_Mobile_Frame:990:1467"
alt=""
aria-hidden="true"
/>
</div>
{/* DESKTOP VIDEO */}
<div className="absolute -inset-x-10 top-10 z-0 hidden h-full scale-[1.15] 2md:block">
<Video
id="Non Beta Release/Animations/Wallet_01:2256:1178"
posterId="Non Beta Release/Animations/Frames/Wallet_01_Frame:2256:1178"
<Image
id="Non Beta Release/Animations/Frames/Wallet_01_Frame:2256:1178"
alt=""
aria-hidden="true"
/>
</div>

Expand Down
4 changes: 2 additions & 2 deletions apps/status.app/src/app/(website)/jobs/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ export default async function JobsPage() {
<div className="mx-auto mb-12 mt-8 max-w-[1224px] px-5 2md:mb-0 2md:mt-[-72px] 2md:px-0">
<div className="relative z-[2] 2md:mx-[-18%]">
<Image
id="Jobs/Top Section/Jobs_01:5113:2971"
id="Jobs/Top Section/Jobs_01-optimized:2448:1422"
alt=""
className="hidden 2md:block"
priority
/>
<Image
id="Jobs/Top Section/Jobs_01_Mobile:1745:1867"
id="Jobs/Top Section/Jobs_01_Mobile-optimized:1745:1867"
alt=""
className="2md:hidden"
/>
Expand Down
2 changes: 1 addition & 1 deletion apps/status.app/src/app/(website)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default async function HomePage() {
</div>
</div>
<Image
id="Non Beta Release/Illustrations/Hero_Non_Beta_Release_Mobile_Long:4662:2579"
id="Non Beta Release/Illustrations/Hero_Non_Beta_Release_Mobile_Long-optimized:1470:813"
alt=""
aria-hidden
width={735}
Expand Down
Loading
Loading