1
- import React , { useState } from 'react' ;
1
+ import React from 'react' ;
2
2
import environment from '../../createRelayEnvironment' ;
3
3
import { commitMutation , createFragmentContainer } from 'react-relay' ;
4
4
import { graphql } from 'babel-plugin-relay/macro' ;
5
5
import Card from '@mui/material/Card' ;
6
6
import CardContent from '@mui/material/CardContent' ;
7
7
import CardHeader from '@mui/material/CardHeader' ;
8
- import FormControl from '@mui/material/FormControl' ;
9
8
import { RepositoryDangerSettings_repository } from './__generated__/RepositoryDangerSettings_repository.graphql' ;
10
9
import { navigateHelper } from '../../utils/navigateHelper' ;
11
10
import { useNavigate } from 'react-router-dom' ;
12
11
import {
13
12
RepositoryDangerSettingsDeleteMutationResponse ,
14
13
RepositoryDangerSettingsDeleteMutationVariables ,
15
14
} from './__generated__/RepositoryDangerSettingsDeleteMutation.graphql' ;
16
- import InputLabel from '@mui/material/InputLabel' ;
17
- import Input from '@mui/material/Input' ;
18
- import { FormHelperText , ListItem , ListItemText } from '@mui/material' ;
15
+ import { ListItem , ListItemText } from '@mui/material' ;
19
16
import Button from '@mui/material/Button' ;
20
- import Check from '@mui/icons-material/Check' ;
21
17
import List from '@mui/material/List' ;
22
18
23
19
const deleteMutation = graphql `
@@ -34,14 +30,11 @@ interface Props {
34
30
35
31
function RepositoryDangerSettings ( props : Props ) {
36
32
let navigate = useNavigate ( ) ;
37
- let [ inputValue , setInputValue ] = useState ( '' ) ;
38
- let [ securedVariableName , setSecuredVariableName ] = useState ( undefined ) ;
39
33
40
34
function deleteCurrentRepository ( ) {
41
- let valueToSecure = inputValue ;
42
35
const variables : RepositoryDangerSettingsDeleteMutationVariables = {
43
36
input : {
44
- clientMutationId : props . repository . name , // todo: replace with a hash of valueToSecure
37
+ clientMutationId : props . repository . name ,
45
38
repositoryId : props . repository . id ,
46
39
} ,
47
40
} ;
0 commit comments