Skip to content

Commit

Permalink
Update static assets (#2384)
Browse files Browse the repository at this point in the history
* update config vars

* update css and code to handle assets
  • Loading branch information
ratik21 authored Oct 25, 2024
1 parent 993bc17 commit 5781c65
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion src/_functions.scss
Original file line number Diff line number Diff line change
@@ -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;
}
2 changes: 1 addition & 1 deletion src/components/invite-dialog/container.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('Container', () => {
const allProps: Properties = {
inviteCode: '',
inviteUrl: '',
assetPath: '',
assetsPath: '',
inviteCount: 0,
isLoading: false,
fetchInvite: () => null,
Expand Down
6 changes: 3 additions & 3 deletions src/components/invite-dialog/container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface Properties extends PublicProperties {
inviteCode: string;
inviteCount: number;
inviteUrl: string;
assetPath: string;
assetsPath: string;
isLoading: boolean;

fetchInvite: () => void;
Expand All @@ -27,7 +27,7 @@ export class Container extends React.Component<Properties> {
return {
inviteCode: createInvitation.code,
inviteUrl: createInvitation.url,
assetPath: config.imageAssetsPath,
assetsPath: config.imageAssetsPath,
inviteCount: createInvitation.inviteCount,
isLoading: createInvitation.isLoading,
};
Expand All @@ -51,7 +51,7 @@ export class Container extends React.Component<Properties> {
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}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 '';
}
Expand Down

0 comments on commit 5781c65

Please sign in to comment.