diff --git a/README.md b/README.md index 77cb611..a6babdb 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,23 @@ And then visit [https://localhost:5000](https://localhost:5000). ## Configuring it -More details to be supplied when available. +### App grid + +An applist is configurable in the public folder to setup the grid of app accessible within Twake Calendar. + +Each app has three fields: + +- name: the app’s name +- icon: the link to the app’s icon +- link: the app’s link or URL + +Example: + +```js +var appList = [ + { name: "My App", icon: "https://myapp.com/myapp.png", link: "https://myapp.com" }, +]; +``` ## Roadmap diff --git a/src/components/Menubar/Menubar.tsx b/src/components/Menubar/Menubar.tsx index 8846723..8d8c2f3 100644 --- a/src/components/Menubar/Menubar.tsx +++ b/src/components/Menubar/Menubar.tsx @@ -15,7 +15,7 @@ export type AppIconProps = { export function Menubar() { const user = useAppSelector((state) => state.user.userData); - const applist: AppIconProps[] = (window as any).appList; + const applist: AppIconProps[] = (window as any).appList ?? []; const [anchorEl, setAnchorEl] = useState(null); const dispatch = useAppDispatch(); @@ -93,6 +93,7 @@ function AppIcon({ prop }: { prop: AppIconProps }) {