Skip to content

Commit

Permalink
Sonarcloud fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rleojoseph committed Jan 23, 2024
1 parent 51277a5 commit 7038d54
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions js-miniapp-sample/src/pages/miniapp-preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,16 +203,7 @@ export const dataFetchReducer = (state: State, action: Action) => {
}
};

type MiniAppPreferenceProps = {
getItem: string,
requestSetItem: (key: string, value: string) => Promise<Boolean>,
requestGetItem: (key: string) => Promise<string>,
requestRemoveItem: (key: string) => Promise<Boolean>,
requestClear: () => Promise<Boolean>,
storageError: MiniAppError,
};

function MiniAppPreferenceComponent(props: MiniAppPreferenceProps) {
function MiniAppPreferenceComponent() {
const classes = useStyles();
const [state, dispatch] = useReducer(dataFetchReducer, initialState);
const [storeKey, setStoreKey] = useState('');
Expand Down Expand Up @@ -452,11 +443,6 @@ function MiniAppPreferenceComponent(props: MiniAppPreferenceProps) {
{state.error}
</Typography>
)}
{!state.isLoading && !state.isError && (
<Typography variant="body1" className={classes.red}>
{props.getItems}
</Typography>
)}
</FormGroup>
);
}
Expand Down

0 comments on commit 7038d54

Please sign in to comment.