Commit 55dd56cb authored by Lyza Danger Gardner's avatar Lyza Danger Gardner Committed by Lyza Gardner

Convert `SidebarContentError` to TS

parent eba15666
...@@ -6,24 +6,25 @@ import { ...@@ -6,24 +6,25 @@ import {
import { useSidebarStore } from '../store'; import { useSidebarStore } from '../store';
/** export type SidebarContentErrorProps = {
* @typedef SidebarContentErrorProps errorType: 'annotation' | 'group';
* @prop {'annotation'|'group'} errorType
* @prop {boolean} [showClearSelection] - Whether to show a "Clear selection" button. /** Whether or not to render a "Clear selection" button */
* @prop {() => void} onLoginRequest - A function that will launch the login flow for the user. showClearSelection?: boolean;
*/
/** A function that will launch the login flow for the user */
onLoginRequest: () => void;
};
/** /**
* Show an error indicating that an annotation or group referenced in the URL * Show an error indicating that an annotation or group referenced in the URL
* could not be fetched. * could not be fetched.
*
* @param {SidebarContentErrorProps} props
*/ */
export default function SidebarContentError({ export default function SidebarContentError({
errorType, errorType,
onLoginRequest, onLoginRequest,
showClearSelection = false, showClearSelection = false,
}) { }: SidebarContentErrorProps) {
const store = useSidebarStore(); const store = useSidebarStore();
const isLoggedIn = store.isLoggedIn(); const isLoggedIn = store.isLoggedIn();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment