@taruvi/navkit 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taruvi/navkit",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "main": "src/App.tsx",
5
5
  "type": "module",
6
6
  "scripts": {
package/src/App.tsx CHANGED
@@ -88,7 +88,7 @@ const NavkitContent = () => {
88
88
  </IconButton>
89
89
  </Box>
90
90
  <MattermostChat
91
- jwtToken={"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE3NjM1Mzk1NjUsImp0aSI6IjFyMEVBZnNJODNvYzg5Vjd4ellUbTVIU2wzZGdkcWRkVFNUdFMybXdzcUE9IiwibmJmIjoxNzYzNTM5NTY1LCJleHAiOjE3NjM2MTE1NjUsImRhdGEiOnsidXNlcm5hbWUiOiJjdXJyYW5jZG9kZGFiZWxlIiwiYWNjb3VudElkIjozLCJzZXNzaW9uSWQiOiI2ZjE4YTgwYy1iMWZiLTRkMzEtODI4My0yOTJhYmNmNzExZDEifSwiaXNzIjoiZW9zLXBsYXRmb3JtIiwiYXVkIjoiaHR0cHM6Ly90YXJ1dmkuZW94dmFudGFnZS5jb206NDQzIn0.XhOHyHj6LZixoh084IGdyb636hLsUereUDd2_oaeyotlHMZVelSS2OIJTurX3IPTsfpUyBGpsVv4OxthmSTBdg"}
91
+ jwtToken={jwtToken}
92
92
  mattermostUrl={siteSettings.mattermostUrl}
93
93
  width="100%"
94
94
  height="100%"
@@ -53,7 +53,7 @@ export const NavkitProvider = ({ children, client }: NavkitProviderProps) => {
53
53
 
54
54
  // Get JWT token if authenticated from sdk
55
55
  if (authenticated) {
56
- const token = ""
56
+ const token = client.tokenClient.getToken() || ''
57
57
  setJwtToken(token)
58
58
  }
59
59
  }
@@ -93,7 +93,7 @@ export const NavkitProvider = ({ children, client }: NavkitProviderProps) => {
93
93
  setUserData(userDataResponse || null)
94
94
 
95
95
  // Fetch user apps using username from userData
96
- if (userDataResponse?.username) {
96
+ if (userDataResponse?.data?.username) {
97
97
  const appsResponse = await user.current.getUserApps(userDataResponse.username)
98
98
  // Transform API response to match AppData interface
99
99
  const transformedApps: AppData[] = (appsResponse || []).map((app: any) => ({