EmojiPicker: fix asset paths
This commit is contained in:
parent
3879dad039
commit
00802b01e9
1 changed files with 6 additions and 4 deletions
|
@ -1,15 +1,17 @@
|
||||||
import { Picker as EmojiPicker, PickerProps } from 'emoji-mart';
|
import { Picker as EmojiPicker, PickerProps } from 'emoji-mart';
|
||||||
import React, { useRef, useEffect } from 'react';
|
import React, { useRef, useEffect } from 'react';
|
||||||
|
|
||||||
|
import { joinPublicPath } from 'soapbox/utils/static';
|
||||||
|
|
||||||
import data from '../data';
|
import data from '../data';
|
||||||
|
|
||||||
const getSpritesheetURL = (set: string) => {
|
const getSpritesheetURL = (set: string) => {
|
||||||
return '/packs/images/32.png';
|
return require('emoji-datasource/img/twitter/sheets/32.png');
|
||||||
}
|
};
|
||||||
|
|
||||||
const getImageURL = (set: string, name: string) => {
|
const getImageURL = (set: string, name: string) => {
|
||||||
return `/packs/emoji/${name}.svg`;
|
return joinPublicPath(`/packs/emoji/${name}.svg`);
|
||||||
}
|
};
|
||||||
|
|
||||||
function Picker(props: PickerProps) {
|
function Picker(props: PickerProps) {
|
||||||
const ref = useRef(null);
|
const ref = useRef(null);
|
||||||
|
|
Loading…
Reference in a new issue