From 9c31804295df29ccba3610759ae9c80cace94c39 Mon Sep 17 00:00:00 2001
From: Xiao Gui <xgui3783@gmail.com>
Date: Mon, 1 Jul 2024 17:35:28 +0200
Subject: [PATCH] fix: expected siibra api version

---
 src/atlasComponents/sapi/sapi.service.ts | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/atlasComponents/sapi/sapi.service.ts b/src/atlasComponents/sapi/sapi.service.ts
index b914e41db..afe997bb5 100644
--- a/src/atlasComponents/sapi/sapi.service.ts
+++ b/src/atlasComponents/sapi/sapi.service.ts
@@ -20,7 +20,7 @@ export const useViewer = {
 } as const
 
 export const SIIBRA_API_VERSION_HEADER_KEY='x-siibra-api-version'
-export const EXPECTED_SIIBRA_API_VERSION = '0.3.17'
+export const EXPECTED_SIIBRA_API_VERSION = '0.3.16'
 
 type PaginatedResponse<T> = {
   items: T[]
@@ -286,9 +286,11 @@ export class SAPI{
     tap(() => {
       const respVersion = SAPI.API_VERSION
       if (respVersion !== EXPECTED_SIIBRA_API_VERSION) {
-        this.snackbar.open(`Expecting ${EXPECTED_SIIBRA_API_VERSION}, got ${respVersion}. Some functionalities may not work as expected.`, 'Dismiss', {
-          duration: 5000
-        })
+        // TODO temporarily disable snackbar. Enable once siibra-api version stabilises
+        console.log(`Expecting ${EXPECTED_SIIBRA_API_VERSION}, got ${respVersion}. Some functionalities may not work as expected.`)
+        // this.snackbar.open(`Expecting ${EXPECTED_SIIBRA_API_VERSION}, got ${respVersion}. Some functionalities may not work as expected.`, 'Dismiss', {
+        //   duration: 5000
+        // })
       }
     }),
     shareReplay(1),
-- 
GitLab