Explorar el Código

add types for components

AykutSarac hace 3 años
padre
commit
bb159247f7
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  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>