+ let contents;
+ if(!repositoryBr.firstLoad || !tweetsBv.firstLoad) {
+ contents = <>
- Repository Senza Nome
+
+
+ >
+ }
+ else if(repository === null) {
+ console.debug("repositoryBr: ", repositoryBr, ", tweetsBv: ", tweetsBv)
+
+ // TODO: Translate this!
+ contents = <>
+
+ This repository was deleted.
+
+ >
+ }
+ else {
+ contents = <>
+
+ {repository.name}
{visualizationTab === "wordcloud" ?
-
- : null}
+
+ : null}
+ >
+ }
+
+ return (
+
+ {contents}
)
}
diff --git a/nest_frontend/utils/Errors.js b/nest_frontend/utils/Errors.js
new file mode 100644
index 0000000..433a73a
--- /dev/null
+++ b/nest_frontend/utils/Errors.js
@@ -0,0 +1,69 @@
+class NestError {
+
+}
+
+
+class ViewNotAllowedError extends NestError {
+ view
+
+ constructor(view) {
+ super();
+
+ this.view = view
+ }
+}
+
+
+class ServerNotConfiguredError extends NestError {
+
+}
+
+
+class FetchAlreadyRunningError extends NestError {
+
+}
+
+
+class FetchError extends NestError {
+ status
+ statusText
+
+ constructor(status, statusText) {
+ super()
+
+ this.status = status
+ this.statusText = statusText
+ }
+}
+
+
+class DecodeError extends FetchError {
+ error
+
+ constructor(status, statusText, error) {
+ super(status, statusText)
+
+ this.error = error
+ }
+}
+
+
+class ResultError extends FetchError {
+ status
+ statusText
+ data
+
+ constructor(status, statusText, data) {
+ super(status, statusText)
+
+ this.data = data
+ }
+
+ getMsg() {
+ return this.data.msg
+ }
+
+ getCode() {
+ return this.data.code
+ }
+}