Skip to content

Commit

Permalink
feat(note-view): added loading state (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
CorentinTh authored Nov 17, 2024
1 parent f399b6a commit 97fd0f5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/app-client/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
}
},
"view": {
"loading": "Loading note...",
"note-content": "Note content",
"assets": {
"download": "Download",
Expand Down
1 change: 1 addition & 0 deletions packages/app-client/src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
}
},
"view": {
"loading": "Chargement de la note...",
"note-content": "Contenu de la note",
"assets": {
"download": "Télécharger",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,14 @@ export const ViewNotePage: Component = () => {
return (
<div>

<Switch>
<Switch
fallback={(
<div class="mx-auto max-w-400px text-center mt-6 flex flex-col justify-center items-center p-6 gap-2">
<div class="i-tabler-loader-2 text-3xl animate-spin text-muted-foreground op-60"></div>
<div class="text-muted-foreground">{t('view.loading')}</div>
</div>
)}
>

<Match when={getError()}>
{error => (
Expand Down

0 comments on commit 97fd0f5

Please sign in to comment.