Просмотр исходного кода

Merge pull request #6484 from weseek/support/apply-nextjs-to-RecentlyCreatedIcon

supprot: Create RecentlyCreatedIcon.tsx
cao 3 лет назад
Родитель
Сommit
9a1bfc5a32

+ 1 - 1
packages/app/src/components/ContentLinkButtons.tsx

@@ -3,7 +3,7 @@ import React, { useCallback, useMemo } from 'react';
 import { smoothScrollIntoView } from '~/client/util/smooth-scroll';
 import { usePageUser } from '~/stores/context';
 
-import RecentlyCreatedIcon from './Icons/RecentlyCreatedIcon';
+import { RecentlyCreatedIcon } from './Icons/RecentlyCreatedIcon';
 
 const WIKI_HEADER_LINK = 120;
 

+ 1 - 3
packages/app/src/components/Icons/RecentlyCreatedIcon.jsx → packages/app/src/components/Icons/RecentlyCreatedIcon.tsx

@@ -1,6 +1,6 @@
 import React from 'react';
 
-const RecentlyCreatedIcon = () => (
+export const RecentlyCreatedIcon = (): JSX.Element => (
   <svg
     xmlns="http://www.w3.org/2000/svg"
     width="20"
@@ -40,5 +40,3 @@ const RecentlyCreatedIcon = () => (
     </g>
   </svg>
 );
-
-export default RecentlyCreatedIcon;