Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: check for desktop os when filtering announcements

Abdullah Attaa61b57794768
diff --git a/apps/web/src/hooks/use-announcements.js b/apps/web/src/hooks/use-announcements.js
index 5190276e8..a7eb06cc7 100644
--- a/apps/web/src/hooks/use-announcements.js
+++ b/apps/web/src/hooks/use-announcements.js
@@ -72,7 +72,11 @@ export default function useAnnouncements(type = "inline") {
return [announcements.filter((a) => a.type === type), remove];
}
-export const allowedPlatforms = ["all", process.env.REACT_APP_PLATFORM];
+export const allowedPlatforms = [
+ "all",
+ process.env.REACT_APP_PLATFORM,
+ window.os
+];
async function shouldShowAnnouncement(announcement) {
if (Config.get(announcement.id) === "removed") return false;