Commit 66c2ea2c authored by isstuev's avatar isstuev

remove cancel button from oublic tag form

parent 1695c797
......@@ -79,13 +79,13 @@ const PublicTagsComponent: React.FC = () => {
return (
<Page>
{ isMobile && screen === 'form' && (
{ screen === 'form' && (
<Link display="inline-flex" alignItems="center" mb={ 6 } onClick={ onGoBack }>
<Icon as={ eastArrowIcon } boxSize={ 6 } transform="rotate(180deg)"/>
<Text variant="inherit" fontSize="sm" ml={ 2 }>Public tags</Text>
{ isMobile && <Text variant="inherit" fontSize="sm" ml={ 2 }>Public tags</Text> }
</Link>
) }
<PageTitle text={ header }/>
<PageTitle text={ header } display={{ base: 'block', lg: 'inline-flex' }} ml={{ base: 0, lg: 3 }}/>
{ content }
</Page>
);
......
......@@ -146,11 +146,6 @@ const PublicTagsForm = ({ changeToDataScreen, data }: Props) => {
mutation.mutate(data);
}, [ mutation ]);
const changeToData = useCallback(() => {
setAlertVisible(false);
changeToDataScreen(false);
}, [ changeToDataScreen ]);
return (
<chakra.form
noValidate
......@@ -242,14 +237,6 @@ const PublicTagsForm = ({ changeToDataScreen, data }: Props) => {
>
Send request
</Button>
<Button
size="lg"
variant="outline"
onClick={ changeToData }
disabled={ mutation.isLoading }
>
Cancel
</Button>
</HStack>
</chakra.form>
);
......
import { Heading } from '@chakra-ui/react';
import { Heading, chakra } from '@chakra-ui/react';
import React from 'react';
const PageTitle = ({ text }: {text: string}) => {
const PageTitle = ({ text, className }: {text: string; className?: string}) => {
return (
<Heading as="h1" size="lg" marginBottom={ 6 }>{ text }</Heading>
<Heading as="h1" size="lg" marginBottom={ 6 } className={ className }>{ text }</Heading>
);
};
export default PageTitle;
export default chakra(PageTitle);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment