Преглед на файлове

add types for components

AykutSarac преди 3 години
родител
ревизия
bb159247f7
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1 1
      src/pages/editor/JsonEditor/index.tsx
  2. 1 1
      src/pages/editor/index.tsx

+ 1 - 1
src/pages/editor/JsonEditor/index.tsx

@@ -35,7 +35,7 @@ export const defaultValue = [
   },
 ];
 
-const JsonEditor = () => {
+const JsonEditor: React.FC = () => {
   const [json, setJson] = useLocalStorage("json", JSON.stringify(defaultValue));
 
   React.useEffect(() => {

+ 1 - 1
src/pages/editor/index.tsx

@@ -27,7 +27,7 @@ const StyledEditor = styled.div`
   overflow: hidden;
 `;
 
-const Editor = () => {
+const Editor: React.FC = () => {
   return (
     <StyledEditorWrapper>
       <StyledTools>tools</StyledTools>