summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/src/components/projects/NewProject.js
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2022-09-15 15:38:06 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2022-09-20 16:07:06 +0200
commit7199e2c15838d78fedd3c6127beddf1656dbeae2 (patch)
tree8ded3dcd92a8d8c571c0f5c80e635ae4e527d1af /opendc-web/opendc-web-ui/src/components/projects/NewProject.js
parent24b857ae580fcbea441e7cb91bc7aba681fc6c8b (diff)
feat(web/ui): Redesign projects page
This change updates the design of the projects page to use a gallery overview.
Diffstat (limited to 'opendc-web/opendc-web-ui/src/components/projects/NewProject.js')
-rw-r--r--opendc-web/opendc-web-ui/src/components/projects/NewProject.js39
1 files changed, 0 insertions, 39 deletions
diff --git a/opendc-web/opendc-web-ui/src/components/projects/NewProject.js b/opendc-web/opendc-web-ui/src/components/projects/NewProject.js
deleted file mode 100644
index bfa7c01a..00000000
--- a/opendc-web/opendc-web-ui/src/components/projects/NewProject.js
+++ /dev/null
@@ -1,39 +0,0 @@
-import React, { useState } from 'react'
-import { Button } from '@patternfly/react-core'
-import { PlusIcon } from '@patternfly/react-icons'
-import { useNewProject } from '../../data/project'
-import { buttonContainer } from './NewProject.module.scss'
-import TextInputModal from '../util/modals/TextInputModal'
-
-/**
- * A container for creating a new project.
- */
-const NewProject = () => {
- const [isVisible, setVisible] = useState(false)
- const { mutate: addProject } = useNewProject()
-
- const onSubmit = (name) => {
- if (name) {
- addProject({ name })
- }
- setVisible(false)
- }
-
- return (
- <>
- <div className={buttonContainer}>
- <Button
- icon={<PlusIcon />}
- color="primary"
- className="pf-u-float-right"
- onClick={() => setVisible(true)}
- >
- New Project
- </Button>
- </div>
- <TextInputModal title="New Project" label="Project name" isOpen={isVisible} callback={onSubmit} />
- </>
- )
-}
-
-export default NewProject