We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f16df97 commit 0609442Copy full SHA for 0609442
src/components/BannerComponent.tsx
@@ -2,13 +2,13 @@ import * as Radium from 'radium';
2
import * as React from 'react';
3
import { readFileSync } from 'fs';
4
5
-const toDataURI = (mediaType: string, value: Buffer): string =>
6
- `data:${mediaType};base64,${value.toString('base64')}`;
+const toDataURI = (mediaType: string, value: string): string =>
+ `data:${mediaType};base64,${value}`;
7
8
-const svg = (value: Buffer): string =>
+const toSVGDataURI = (value: string): string =>
9
toDataURI('image/svg+xml', value);
10
11
-const TWITTER_SVG = svg(readFileSync(`${__dirname}/twitter.svg`));
+const TWITTER_SVG = toSVGDataURI(readFileSync(`${__dirname}/twitter.svg`, 'base64'));
12
13
export enum BannerKind {
14
primary,
0 commit comments