mirror of
https://github.com/mue/mue.git
synced 2026-06-12 03:28:46 +02:00
fix: use localised wikipedia for api, remove unused icons
This commit is contained in:
@@ -4,7 +4,6 @@ import Tooltip from '../../../helpers/tooltip/Tooltip';
|
||||
import ImageCarousel from '../../../helpers/carousel/Carousel';
|
||||
import { toast } from 'react-toastify';
|
||||
import {
|
||||
MdArrowBack,
|
||||
MdIosShare,
|
||||
MdFlag,
|
||||
MdWarning,
|
||||
@@ -13,8 +12,6 @@ import {
|
||||
MdFormatQuote,
|
||||
MdImage,
|
||||
MdTranslate,
|
||||
MdKeyboardArrowDown,
|
||||
MdKeyboardArrowUp,
|
||||
MdOutlineKeyboardArrowRight,
|
||||
MdExpandMore,
|
||||
} from 'react-icons/md';
|
||||
|
||||
@@ -7,7 +7,6 @@ import {
|
||||
MdOutlineKeyboardArrowRight,
|
||||
MdRefresh,
|
||||
MdOutlineArrowForward,
|
||||
MdOutlineOpenInNew,
|
||||
} from 'react-icons/md';
|
||||
|
||||
import Item from '../Item';
|
||||
|
||||
@@ -22,7 +22,6 @@ import {
|
||||
MdOutlineAssessment as Stats,
|
||||
MdOutlineNewReleases as Changelog,
|
||||
MdInfoOutline as About,
|
||||
MdEvent as Reminder,
|
||||
MdCode as Sideload,
|
||||
MdAddCircleOutline as Added,
|
||||
MdAddCircleOutline as Create,
|
||||
|
||||
@@ -115,7 +115,7 @@ export default class Quote extends PureComponent {
|
||||
|
||||
const authorimgdata = await (
|
||||
await fetch(
|
||||
`https://en.wikipedia.org/w/api.php?action=query&titles=${author}&origin=*&prop=pageimages&format=json&pithumbsize=100`,
|
||||
`https://${variables.languagecode.split('_')[0]}.wikipedia.org/w/api.php?action=query&titles=${author}&origin=*&prop=pageimages&format=json&pithumbsize=100`,
|
||||
)
|
||||
).json();
|
||||
|
||||
@@ -126,7 +126,7 @@ export default class Quote extends PureComponent {
|
||||
|
||||
const authorimglicensedata = await (
|
||||
await fetch(
|
||||
`https://en.wikipedia.org/w/api.php?action=query&prop=imageinfo&iiprop=extmetadata&titles=File:${
|
||||
`https://${variables.languagecode.split('_')[0]}.wikipedia.org/w/api.php?action=query&prop=imageinfo&iiprop=extmetadata&titles=File:${
|
||||
authorimgdata.query.pages[Object.keys(authorimgdata.query.pages)[0]].pageimage
|
||||
}&origin=*&format=json`,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user