diff --git a/src/atoms/current-user.atom.ts b/src/atoms/current-user.atom.ts
index 5955543..f79188e 100644
--- a/src/atoms/current-user.atom.ts
+++ b/src/atoms/current-user.atom.ts
@@ -1,7 +1,39 @@
import {atom} from "jotai";
+import {atomWithStorage, loadable} from "jotai/utils";
+import Cookies from 'js-cookie';
+
import {UserProfileModel} from "../models";
-import {loadable} from "jotai/utils";
+const cookieStorage = {
+ getItem: (key, initialValue) => {
+ const value = Cookies.get(key) || initialValue
+ console.log('Getting cookie value: ', {key, value})
+
+ return value;
+ },
+ setItem: (key, value) => {
+ console.log('Setting cookie value: ', {key, value})
+ console.error(new Error('Setting cookie value'))
+ Cookies.set(key, value, {expires: 1})
+ },
+ removeItem: (key) => {
+ console.log('Removing cookie: ', {key})
+ Cookies.remove(key)
+ }
+}
+
+export const accessTokenAtom = atomWithStorage
(
+ 'accessToken',
+ '',
+ cookieStorage,
+)
export const currentUserAtom = atom>(Promise.resolve(undefined));
export const currentUserAtomLoadable = loadable(currentUserAtom);
+
+export const errorStateAtom = atom(false)
+export const errorMessageAtom = atom('')
+
+export const loggedInAtom = atom(
+ get => !!get(accessTokenAtom)
+)
diff --git a/src/models/menu-links.model.ts b/src/models/menu-links.model.ts
index f717291..550a541 100644
--- a/src/models/menu-links.model.ts
+++ b/src/models/menu-links.model.ts
@@ -1,8 +1,10 @@
+import {ReactNode} from "react";
export interface MenuLinksModel {
title: string;
href: string;
- element: any;
+ element: ReactNode;
+ skipAuth?: boolean;
excludeFromMenu?: boolean;
subMenus?: MenuLinksModel[];
}
diff --git a/src/views/KYC/KYCCaseDetail/KYCCaseDetail.tsx b/src/views/KYC/KYCCaseDetail/KYCCaseDetail.tsx
index 2ee083d..6f99ee8 100644
--- a/src/views/KYC/KYCCaseDetail/KYCCaseDetail.tsx
+++ b/src/views/KYC/KYCCaseDetail/KYCCaseDetail.tsx
@@ -9,10 +9,9 @@ import './KYCCaseDetail.scss';
import {KYCCaseNew} from "./KYCCaseNew";
import {KYCCasePending} from "./KYCCasePending";
import {KYCCaseReview} from "./KYCCaseReview";
-import {KYCCaseCompleted} from "./KYCCaseCompleted";
+import {KYCCaseOutreach} from "./KYCCaseOutreach";
import {selectedKycCaseAtom, selectedKycCaseAtomLoadable} from "../../../atoms";
import {KycCaseModel} from "../../../models";
-import {KYCCaseOutreach} from "./KYCCaseOutreach";
export interface KYCCaseDetailProps {
basePath: string;
diff --git a/src/views/Welcome/Welcome.tsx b/src/views/Welcome/Welcome.tsx
new file mode 100644
index 0000000..286ecc2
--- /dev/null
+++ b/src/views/Welcome/Welcome.tsx
@@ -0,0 +1,15 @@
+// eslint-disable-next-line @typescript-eslint/ban-ts-comment
+// @ts-ignore
+import React from 'react';
+
+export interface WelcomeProps {
+}
+
+export const Welcome: React.FunctionComponent = () => {
+
+ return (
+
+
Watsonx use case demos
+
+ )
+}
diff --git a/src/views/Welcome/index.ts b/src/views/Welcome/index.ts
new file mode 100644
index 0000000..5509a10
--- /dev/null
+++ b/src/views/Welcome/index.ts
@@ -0,0 +1,2 @@
+
+export * from './Welcome'
diff --git a/src/views/index.ts b/src/views/index.ts
index 640469a..0783eb7 100644
--- a/src/views/index.ts
+++ b/src/views/index.ts
@@ -7,3 +7,4 @@ export * from './KYC'
export * from './KycSummarize'
export * from './Login'
export * from './DataExtraction'
+export * from './Welcome'