From 5781c657a40921db618d9e851a8d403a8c3dc2ed Mon Sep 17 00:00:00 2001 From: Ratik Jindal Date: Fri, 25 Oct 2024 13:50:22 +0530 Subject: [PATCH] Update static assets (#2384) * update config vars * update css and code to handle assets --- .env.example | 4 ++-- src/_functions.scss | 2 +- src/components/invite-dialog/container.test.tsx | 2 +- src/components/invite-dialog/container.tsx | 6 +++--- src/main.scss | 2 +- src/utils.ts | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.env.example b/.env.example index d3fb83ea3..cb55a50d3 100644 --- a/.env.example +++ b/.env.example @@ -19,9 +19,9 @@ REACT_APP_GIPHY_SDK_KEY= REACT_APP_MESSENGER_INVITE_PATH="http://localhost:3000/get-access" -REACT_APP_VIDEO_ASSETS_PATH="https://res.cloudinary.com/fact0ry/video/upload/v1681745540/zero-assets/zos/" +REACT_APP_VIDEO_ASSETS_PATH="https://zos-assets.s3.us-east-1.amazonaws.com/videos" -REACT_APP_IMAGE_ASSETS_PATH="https://res.cloudinary.com/fact0ry/image/upload/v1681745540/zero-assets/zos" +REACT_APP_IMAGE_ASSETS_PATH="https://zos-assets.s3.us-east-1.amazonaws.com/images" REACT_APP_ANDROID_STORE_PATH="https://play.google.com/store/apps/details?id=com.zero.android" diff --git a/src/_functions.scss b/src/_functions.scss index 369a505e2..e9477c7de 100644 --- a/src/_functions.scss +++ b/src/_functions.scss @@ -1,4 +1,4 @@ @function cloudAsset($name) { - $root: 'https://res.cloudinary.com/fact0ry/image/upload/v1681745540/zero-assets/zos/'; + $root: 'https://zos-assets.s3.us-east-1.amazonaws.com/images/'; @return $root + $name; } diff --git a/src/components/invite-dialog/container.test.tsx b/src/components/invite-dialog/container.test.tsx index 61cdcf448..380ad511e 100644 --- a/src/components/invite-dialog/container.test.tsx +++ b/src/components/invite-dialog/container.test.tsx @@ -11,7 +11,7 @@ describe('Container', () => { const allProps: Properties = { inviteCode: '', inviteUrl: '', - assetPath: '', + assetsPath: '', inviteCount: 0, isLoading: false, fetchInvite: () => null, diff --git a/src/components/invite-dialog/container.tsx b/src/components/invite-dialog/container.tsx index 5b556ea3b..d492059a5 100644 --- a/src/components/invite-dialog/container.tsx +++ b/src/components/invite-dialog/container.tsx @@ -13,7 +13,7 @@ export interface Properties extends PublicProperties { inviteCode: string; inviteCount: number; inviteUrl: string; - assetPath: string; + assetsPath: string; isLoading: boolean; fetchInvite: () => void; @@ -27,7 +27,7 @@ export class Container extends React.Component { return { inviteCode: createInvitation.code, inviteUrl: createInvitation.url, - assetPath: config.imageAssetsPath, + assetsPath: config.imageAssetsPath, inviteCount: createInvitation.inviteCount, isLoading: createInvitation.isLoading, }; @@ -51,7 +51,7 @@ export class Container extends React.Component { inviteCode={this.props.inviteCode} inviteCount={this.props.inviteCount} inviteUrl={this.props.inviteUrl} - assetsPath={this.props.assetPath} + assetsPath={this.props.assetsPath} onClose={this.props.onClose} isLoading={this.props.isLoading} /> diff --git a/src/main.scss b/src/main.scss index 1045665ac..a2ae3720c 100644 --- a/src/main.scss +++ b/src/main.scss @@ -62,7 +62,7 @@ $border-color-hover: theme-zui.$color-primary-7; @include main-background; &.static-green-particles { - background-image: url(cloudAsset('AbstractBGwithoutShine.jpg')); + background-image: url(cloudAsset('GreenParticlesStatic.png')); } &.static-lights-out { diff --git a/src/utils.ts b/src/utils.ts index 1c3ea98a0..669b2ea39 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -31,9 +31,9 @@ export function getMainBackgroundClass(selectedMainBackground) { export function getMainBackgroundVideoSrc(selectedMainBackground) { switch (selectedMainBackground) { case MainBackground.AnimatedGreenParticles: - return `${config.videoAssetsPath}GreenParticlesBG.mp4`; + return `${config.videoAssetsPath}/GreenParticlesBG.mp4`; case MainBackground.AnimatedBlackParticles: - return `${config.videoAssetsPath}BlackParticlesBG.mp4`; + return `${config.videoAssetsPath}/BlackParticlesBG.mp4`; default: return ''; }