import { SshKeyPanelRoot, SshKeyPanelRootDataProps, SshKeyPanelRootActionProps } from 'views/ssh-key-panel/ssh-key-panel-root';
const mapStateToProps = (state: RootState): SshKeyPanelRootDataProps => {
+ const sshKeys = state.auth.sshKeys = state.auth.sshKeys.filter((key) => {
+ return key.authorizedUserUuid == state.auth.user.uuid;
+ });
+
return {
- sshKeys: state.auth.sshKeys,
- hasKeys: state.auth.sshKeys!.length > 0
+ sshKeys: sshKeys,
+ hasKeys: sshKeys!.length > 0
};
};