import React from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import TextInput from '../TextInput'; import Checkbox from '../Checkbox'; import Button from '../Button'; import Error from '../Error'; import { fadeIn } from '../../helpers/animations'; const Form = styled.form` position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; margin: 32px 0; animation: ${fadeIn} 0.8s ease; input { flex: 0 0 auto; margin-right: 16px; } @media only screen and (max-width: 768px) { margin: 16px 0; } `; const DomainWrapper = styled.div` display: flex; align-items: center; `; const ButtonWrapper = styled.div` display: flex; align-items: center; margin: 32px 0; animation: ${fadeIn} 0.8s ease; button { margin-right: 16px; } @media only screen and (max-width: 768px) { flex-direction: column; align-items: flex-start; > * { margin: 8px 0; } } `; const Domain = styled.h4` margin: 0 16px 0 0; font-size: 20px; font-weight: bold; span { border-bottom: 2px dotted #999; } `; const Homepage = styled.h6` margin: 0 16px 0 0; font-size: 14px; font-weight: 300; span { border-bottom: 2px dotted #999; } `; const InputWrapper = styled.div` display: flex; align-items: center; `; const LabelWrapper = styled.div` display: flex; flex-direction: column; span { font-weight: bold; margin-bottom: 8px; } `; const SettingsDomain = ({ settings, handleCustomDomain, loading, showDomainInput, showModal, handleCheckbox, }) => (

Custom domain

You can set a custom domain for your short URLs, so instead of kutt.it/shorturl you can have example.com/shorturl.

Point your domain A record to 192.64.116.170 then add the domain via form below:

{settings.customDomain && !settings.domainInput ? (
{settings.customDomain} (Homepage redirects to {settings.homepage || window.location.hostname})
) : (
Domain Homepage (Optional) )}
); SettingsDomain.propTypes = { settings: PropTypes.shape({ customDomain: PropTypes.string.isRequired, domainInput: PropTypes.bool.isRequired, }).isRequired, handleCustomDomain: PropTypes.func.isRequired, loading: PropTypes.bool.isRequired, showDomainInput: PropTypes.func.isRequired, showModal: PropTypes.func.isRequired, handleCheckbox: PropTypes.func.isRequired, }; export default SettingsDomain;