Skip to content

Commit

Permalink
add snapshot error tooltip to rpcutils
Browse files Browse the repository at this point in the history
  • Loading branch information
davidspek committed Feb 2, 2021
1 parent a7129bd commit b93d80e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions labextension/src/lib/RPCUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,17 @@ export const rokErrorTooltip = (rokError: IRPCError) => {
);
};

export const snapshotErrorTooltip = (snapshotError: IRPCError) => {
return (
<React.Fragment>
<div>
This feature requires snapshot support.{' '}
<a onClick={_ => showRpcError(snapshotError)}>More info...</a>
</div>
</React.Fragment>
);
};

const serialize = (obj: any) => window.btoa(JSON.stringify(obj));
const deserialize = (raw_data: string) =>
window.atob(raw_data.substring(1, raw_data.length - 1));
Expand Down

0 comments on commit b93d80e

Please sign in to comment.