mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-12 15:52:56 +10:00
completed code quality check, code reusability
This commit is contained in:
@ -7,7 +7,7 @@ import TextField from '../../../shared/TextField';
|
|||||||
import TextArea from '../../../shared/TextArea';
|
import TextArea from '../../../shared/TextArea';
|
||||||
import AppContext from '../../../context/AppContext';
|
import AppContext from '../../../context/AppContext';
|
||||||
import Checkbox from '../../../shared/Checkbox';
|
import Checkbox from '../../../shared/Checkbox';
|
||||||
import { addItem, deleteItem, moveItemUp, moveItemDown } from '../../../utils';
|
import { addItem } from '../../../utils';
|
||||||
import ItemActions from '../../../shared/ItemActions';
|
import ItemActions from '../../../shared/ItemActions';
|
||||||
import AddItemButton from '../../../shared/AddItemButton';
|
import AddItemButton from '../../../shared/AddItemButton';
|
||||||
|
|
||||||
@ -171,14 +171,11 @@ const Item = ({ item, index, onChange, dispatch, first, last }) => {
|
|||||||
<Form item={item} onChange={onChange} identifier={identifier} />
|
<Form item={item} onChange={onChange} identifier={identifier} />
|
||||||
|
|
||||||
<ItemActions
|
<ItemActions
|
||||||
deleteItem={deleteItem}
|
|
||||||
dispatch={dispatch}
|
dispatch={dispatch}
|
||||||
first={first}
|
first={first}
|
||||||
identifier={identifier}
|
identifier={identifier}
|
||||||
item={item}
|
item={item}
|
||||||
last={last}
|
last={last}
|
||||||
moveItemDown={moveItemDown}
|
|
||||||
moveItemUp={moveItemUp}
|
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
type="work"
|
type="work"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -1,18 +1,9 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Checkbox from './Checkbox';
|
|
||||||
|
|
||||||
const ItemActions = ({
|
import Checkbox from './Checkbox';
|
||||||
deleteItem,
|
import { deleteItem, moveItemUp, moveItemDown } from '../utils';
|
||||||
dispatch,
|
|
||||||
first,
|
const ItemActions = ({ dispatch, first, identifier, item, last, onChange, type }) => {
|
||||||
identifier,
|
|
||||||
item,
|
|
||||||
last,
|
|
||||||
moveItemDown,
|
|
||||||
moveItemUp,
|
|
||||||
onChange,
|
|
||||||
type,
|
|
||||||
}) => {
|
|
||||||
return (
|
return (
|
||||||
<div className="flex justify-between">
|
<div className="flex justify-between">
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
|
|||||||
Reference in New Issue
Block a user