Skip to content

Commit

Permalink
feat: all images are now in .env
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi-pcn committed Oct 3, 2024
1 parent 51a8c9a commit b334804
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/utils/badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import sharp from 'sharp';
import { Badge } from '../types';
import env from './env';

const loadImageBadgeRestricted = () => `data:image/png;base64,${env.badge.badge_restricted}`;
const loadImageBadgeOrgaPrice = () => `data:image/png;base64,${env.badge.badge_orgaprice}`;
const loadImageBadgeFullAccess = () => `data:image/png;base64,${env.badge.badge_fullaccess}`;
const loadImageBadgeInvite = () => `data:image/png;base64,${env.badge.badge_invite}`;

const loadBackRestricted = () => `data:image/png;base64,${env.badge.badge_restricted_back}`;
const loadBackOrgaPrice = () => `data:image/png;base64,${env.badge.badge_orgaprice_back}`;
const loadBackFullAccess = () => `data:image/png;base64,${env.badge.badge_fullaccess_back}`;
const loadBackInvite = () => `data:image/png;base64,${env.badge.badge_invite_back}`;
const loadImageBadgeRestricted = () => env.badge.badge_restricted;
const loadImageBadgeOrgaPrice = () => env.badge.badge_orgaprice;
const loadImageBadgeFullAccess = () => env.badge.badge_fullaccess;
const loadImageBadgeInvite = () => env.badge.badge_invite;

const loadBackRestricted = () => env.badge.badge_restricted_back;
const loadBackOrgaPrice = () => env.badge.badge_orgaprice_back;
const loadBackFullAccess = () => env.badge.badge_fullaccess_back;
const loadBackInvite = () => env.badge.badge_invite_back;

type BadgePermission = 'restricted' | 'orgaprice' | 'fullaccess' | 'invite';

Expand Down

0 comments on commit b334804

Please sign in to comment.