Skip to content

Commit 37bcde6

Browse files
committed
chore: remove migration notice
1 parent 3792733 commit 37bcde6

1 file changed

Lines changed: 5 additions & 27 deletions

File tree

client/src/App.js

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -38,32 +38,12 @@ export default function App() {
3838
const server_list = process.env.REACT_APP_SERVER.split(",");
3939
const info = JSON.parse(localStorage.getItem("info"));
4040

41-
// Check if user has dismissed migration notice
42-
const showMigrationNotice = () => {
43-
const migrationNoticeDismissed = localStorage.getItem(
44-
"migrationNoticeDismissed"
45-
);
46-
if (migrationNoticeDismissed !== "true") {
47-
const notification = setNotification(
48-
NOTIFICATION_TYPES.WARNING,
49-
"We're migrating to a new server.\nDue to instance spin-down during inactivity, initialization may take up to 50 seconds. Thanks for your patience!\nClick to dismiss this message."
50-
);
51-
52-
// Add click handler to dismiss permanently
53-
notification.style.cursor = "pointer";
54-
notification.addEventListener("click", () => {
55-
localStorage.setItem("migrationNoticeDismissed", "true");
56-
notification.classList.add("hide");
57-
});
58-
}
59-
};
60-
6141
if (info && info.status && info.message) {
6242
setNotification(
6343
info.status === 200
6444
? NOTIFICATION_TYPES.SUCCESS
6545
: NOTIFICATION_TYPES.DANGER,
66-
info.message
46+
info.message,
6747
);
6848
localStorage.removeItem("info");
6949
}
@@ -77,7 +57,7 @@ export default function App() {
7757
if (window.location.pathname.split("/")[1] === a) {
7858
if (window.location.pathname.split("/")[1] !== "app")
7959
window.location = `/login?next=${encodeURIComponent(
80-
window.location.pathname
60+
window.location.pathname,
8161
)}`;
8262
else window.location = "/login";
8363
}
@@ -137,16 +117,14 @@ export default function App() {
137117
)
138118
setNotification(
139119
NOTIFICATION_TYPES.DANGER,
140-
err.response.data.message
120+
err.response.data.message,
141121
);
142122
});
143123
}
144124
if (server) getData();
145125
}, [server]);
146126

147127
useEffect(() => {
148-
showMigrationNotice();
149-
150128
async function ping(a) {
151129
await axios
152130
.get(`${server_list[a]}/status`)
@@ -160,12 +138,12 @@ export default function App() {
160138
console.log(
161139
"%c%s",
162140
"color: red; background: yellow; font-size: 24px",
163-
"WARNING!"
141+
"WARNING!",
164142
);
165143
console.log(
166144
"%c%s",
167145
"font-size: 18px",
168-
"Using this console may allow attackers to impersonate you and steal your information using an attack called Self-XSS.\nDo not enter or paste code that you do not understand."
146+
"Using this console may allow attackers to impersonate you and steal your information using an attack called Self-XSS.\nDo not enter or paste code that you do not understand.",
169147
);
170148
ping(0);
171149
}, []);

0 commit comments

Comments
 (0)