summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer/components/ExitLocations.tsx
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2021-12-06 10:13:54 +0100
committerOskar Nyberg <oskar@mullvad.net>2022-01-03 13:48:03 +0100
commit4e727b0bdbb4d2fa2cb1842b9382b182c8564eb5 (patch)
treeca1975339b0e260f2863f823273f72477a136902 /gui/src/renderer/components/ExitLocations.tsx
parentace538ae171575e66cd3b76c65f13464f0edc92b (diff)
downloadmullvadvpn-4e727b0bdbb4d2fa2cb1842b9382b182c8564eb5.tar.xz
mullvadvpn-4e727b0bdbb4d2fa2cb1842b9382b182c8564eb5.zip
Rename ExitLocations component to Locations
Diffstat (limited to 'gui/src/renderer/components/ExitLocations.tsx')
-rw-r--r--gui/src/renderer/components/ExitLocations.tsx44
1 files changed, 0 insertions, 44 deletions
diff --git a/gui/src/renderer/components/ExitLocations.tsx b/gui/src/renderer/components/ExitLocations.tsx
deleted file mode 100644
index e4174a0e7c..0000000000
--- a/gui/src/renderer/components/ExitLocations.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-import * as React from 'react';
-import { RelayLocation } from '../../shared/daemon-rpc-types';
-import { IRelayLocationRedux } from '../redux/settings/reducers';
-import LocationList, {
- LocationSelection,
- LocationSelectionType,
- RelayLocations,
-} from './LocationList';
-
-interface IExitLocationsProps {
- source: IRelayLocationRedux[];
- defaultExpandedLocations?: RelayLocation[];
- selectedValue?: RelayLocation;
- selectedElementRef?: React.Ref<React.ReactInstance>;
- onSelect?: (value: LocationSelection<never>) => void;
- onWillExpand?: (locationRect: DOMRect, expandedContentHeight: number) => void;
- onTransitionEnd?: () => void;
-}
-
-const ExitLocations = React.forwardRef(function ExitLocationsT(
- props: IExitLocationsProps,
- ref: React.Ref<LocationList<never>>,
-) {
- const selectedValue: LocationSelection<never> | undefined = props.selectedValue
- ? { type: LocationSelectionType.relay, value: props.selectedValue }
- : undefined;
-
- return (
- <LocationList
- ref={ref}
- defaultExpandedLocations={props.defaultExpandedLocations}
- selectedValue={selectedValue}
- selectedElementRef={props.selectedElementRef}
- onSelect={props.onSelect}>
- <RelayLocations
- source={props.source}
- onWillExpand={props.onWillExpand}
- onTransitionEnd={props.onTransitionEnd}
- />
- </LocationList>
- );
-});
-
-export default ExitLocations;