mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-23 12:16:38 +00:00
fix typescript complaining
This commit is contained in:
parent
a9b72c6d28
commit
2f610eb955
|
@ -30,8 +30,6 @@ import MutationButton from "../../../../components/form/mutation-button";
|
|||
export default function DomainPermissionExcludeDetail() {
|
||||
const baseUrl = useBaseUrl();
|
||||
const backLocation: string = history.state?.backLocation ?? `~${baseUrl}`;
|
||||
const [_location, setLocation] = useLocation();
|
||||
const [ deleteExclude, deleteResult ] = useDeleteDomainPermissionExcludeMutation();
|
||||
|
||||
const params = useParams();
|
||||
let id = params.excludeId as string | undefined;
|
||||
|
@ -86,6 +84,19 @@ export default function DomainPermissionExcludeDetail() {
|
|||
<dd>{privateComment}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
<HandleExclude
|
||||
id={id}
|
||||
backLocation={backLocation}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function HandleExclude({ id, backLocation}: {id: string, backLocation: string}) {
|
||||
const [_location, setLocation] = useLocation();
|
||||
const [ deleteExclude, deleteResult ] = useDeleteDomainPermissionExcludeMutation();
|
||||
|
||||
return (
|
||||
<MutationButton
|
||||
label={`Delete exclude`}
|
||||
title={`Delete exclude`}
|
||||
|
@ -104,7 +115,5 @@ export default function DomainPermissionExcludeDetail() {
|
|||
showError={true}
|
||||
result={deleteResult}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue