Skip to content

Commit

Permalink
[feature] Reload page after importing
Browse files Browse the repository at this point in the history
If we don't do that, the content does not refresh.
PS : There is probably cleaner solutions to do that without reloading the page, but for a question of time, I'm doing it like this for the moment.
  • Loading branch information
Azecko committed Nov 12, 2024
1 parent aeeb547 commit 6c5dc00
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/responsable/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default function Page() {
const fileContent = event.target.result;
const jsonData = JSON.parse(fileContent);
localStorage.setItem('rapport-de-stage', JSON.stringify(jsonData))
location.reload()

} catch (error) {
alert("Erreur de lecture du fichier JSON. Vérifiez que le fichier est bien formaté.");
Expand Down

0 comments on commit 6c5dc00

Please sign in to comment.