mirror of
https://github.com/wanderer-industries/wanderer
synced 2025-12-12 10:45:54 +00:00
feat(Map): Link signature on splash
This commit is contained in:
@@ -21,8 +21,6 @@ const signatureSettings: Setting[] = [{ key: COSMIC_SIGNATURE, name: 'Show Cosmi
|
|||||||
export const SystemLinkSignatureDialog = ({ data, setVisible }: SystemLinkSignatureDialogProps) => {
|
export const SystemLinkSignatureDialog = ({ data, setVisible }: SystemLinkSignatureDialogProps) => {
|
||||||
const { outCommand } = useMapRootState();
|
const { outCommand } = useMapRootState();
|
||||||
|
|
||||||
console.log(data);
|
|
||||||
|
|
||||||
const ref = useRef({ outCommand });
|
const ref = useRef({ outCommand });
|
||||||
ref.current = { outCommand };
|
ref.current = { outCommand };
|
||||||
|
|
||||||
@@ -31,8 +29,8 @@ export const SystemLinkSignatureDialog = ({ data, setVisible }: SystemLinkSignat
|
|||||||
}, [setVisible]);
|
}, [setVisible]);
|
||||||
|
|
||||||
const handleSelect = useCallback(
|
const handleSelect = useCallback(
|
||||||
(signatures: SystemSignature[]) => {
|
(signature: SystemSignature) => {
|
||||||
if (!signatures.length) {
|
if (!signature) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,7 +40,7 @@ export const SystemLinkSignatureDialog = ({ data, setVisible }: SystemLinkSignat
|
|||||||
type: OutCommand.linkSignatureToSystem,
|
type: OutCommand.linkSignatureToSystem,
|
||||||
data: {
|
data: {
|
||||||
...data,
|
...data,
|
||||||
signature_eve_id: signatures[0].eve_id,
|
signature_eve_id: signature.eve_id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ interface SystemSignaturesContentProps {
|
|||||||
systemId: string;
|
systemId: string;
|
||||||
settings: Setting[];
|
settings: Setting[];
|
||||||
selectable?: boolean;
|
selectable?: boolean;
|
||||||
onSelect?: (signatures: SystemSignature[]) => void;
|
onSelect?: (signature: SystemSignature) => void;
|
||||||
}
|
}
|
||||||
export const SystemSignaturesContent = ({ systemId, settings, selectable, onSelect }: SystemSignaturesContentProps) => {
|
export const SystemSignaturesContent = ({ systemId, settings, selectable, onSelect }: SystemSignaturesContentProps) => {
|
||||||
const { outCommand } = useMapRootState();
|
const { outCommand } = useMapRootState();
|
||||||
|
|||||||
Reference in New Issue
Block a user