Skip to content

Commit 0609442

Browse files
Removes bundled Buffer module
1 parent f16df97 commit 0609442

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/BannerComponent.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import * as Radium from 'radium';
22
import * as React from 'react';
33
import { readFileSync } from 'fs';
44

5-
const toDataURI = (mediaType: string, value: Buffer): string =>
6-
`data:${mediaType};base64,${value.toString('base64')}`;
5+
const toDataURI = (mediaType: string, value: string): string =>
6+
`data:${mediaType};base64,${value}`;
77

8-
const svg = (value: Buffer): string =>
8+
const toSVGDataURI = (value: string): string =>
99
toDataURI('image/svg+xml', value);
1010

11-
const TWITTER_SVG = svg(readFileSync(`${__dirname}/twitter.svg`));
11+
const TWITTER_SVG = toSVGDataURI(readFileSync(`${__dirname}/twitter.svg`, 'base64'));
1212

1313
export enum BannerKind {
1414
primary,

0 commit comments

Comments
 (0)