Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/klevultd/frontend-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhil-narayana-klevu committed May 24, 2024
2 parents 4b94f7b + ac07d1c commit b7e6f8e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions examples/react/src/components/configdrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ export const ConfigDrawer = () => {
window.location.reload()
}, 100)
}
const onResetPersonalisation = () => {
localStorage.removeItem("klevu-last-searches");
localStorage.removeItem("klevu-last-clicks");
setTimeout(() => {
window.location.reload()
}, 100)
}
return (
<>
<IconButton onClick={() => setIsDrawerOpen(true)}>
Expand Down Expand Up @@ -123,6 +130,20 @@ export const ConfigDrawer = () => {
General
</Typography>
</Grid>
<Grid item xs={12} sm={4}>
<Typography variant="body2" component="div">
Reset Personalisation Data
</Typography>
</Grid>
<Grid item xs={12} sm={8}>
<Button
onClick={onResetPersonalisation}
variant="outlined"
color="primary"
>
Reset & Refresh
</Button>
</Grid>
<Grid item xs={12} sm={4}>
<Typography variant="body2" component="div">
Search url
Expand Down

0 comments on commit b7e6f8e

Please sign in to comment.