mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
fix fetch media-type resource
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { AspectRatio, chakra, Skeleton } from '@chakra-ui/react';
|
||||
import type { StaticRoute } from 'nextjs-routes';
|
||||
import { route } from 'nextjs-routes';
|
||||
import React from 'react';
|
||||
|
||||
@@ -35,7 +36,7 @@ const NftMedia = ({ imageUrl, animationUrl, className, isLoading }: Props) => {
|
||||
return;
|
||||
}
|
||||
|
||||
const url = route({ pathname: '/api/media-type', query: { url: animationUrl } });
|
||||
const url = route({ pathname: '/node-api/media-type' as StaticRoute<'/api/media-type'>['pathname'], query: { url: animationUrl } });
|
||||
fetch(url)
|
||||
.then((response) => response.json())
|
||||
.then((_data) => {
|
||||
|
||||
Reference in New Issue
Block a user