1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import React from "react";
6 import { Dispatch } from "redux";
7 import { connect } from "react-redux";
8 import { RootState } from 'store/store';
9 import { withDialog, WithDialogProps } from "store/dialog/with-dialog";
10 import { NOT_FOUND_DIALOG_NAME } from 'store/not-found-panel/not-found-panel-action';
11 import { Dialog, DialogContent, DialogActions, Button, withStyles, StyleRulesCallback, WithStyles } from '@material-ui/core';
12 import { ArvadosTheme } from 'common/custom-theme';
13 import { NotFoundPanel } from "views/not-found-panel/not-found-panel";
15 type CssRules = 'tag';
17 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
19 marginRight: theme.spacing.unit,
20 marginBottom: theme.spacing.unit
24 interface NotFoundDialogDataProps {
28 interface NotFoundDialogActionProps {
32 const mapStateToProps = (state: RootState): NotFoundDialogDataProps => ({
36 const mapDispatchToProps = (dispatch: Dispatch): NotFoundDialogActionProps => ({
40 type NotFoundDialogProps = NotFoundDialogDataProps & NotFoundDialogActionProps & WithDialogProps<{}> & WithStyles<CssRules>;
42 export const NotFoundDialog = connect(mapStateToProps, mapDispatchToProps)(
44 withDialog(NOT_FOUND_DIALOG_NAME)(
45 ({ open, closeDialog }: NotFoundDialogProps) =>
53 <NotFoundPanel notWrapped />
59 onClick={closeDialog}>