@@ -13,6 +13,8 @@ import PointPresenter from './PointPresenter';
1313import DangerBox from './DangerBox';
1414import View from 'components/View';
1515
16+import { isMacOs, isWindows } from 'react-device-detect';
17+
1618const MasterKeyTransfer = () => {
1719 const { performL2Reticket } = useRoller();
1820 const {
@@ -45,6 +47,22 @@ const MasterKeyTransfer = () => {
4547 inviteWallet.value,
4648 ]);
4749
50+ const downloadButtonLabel = useMemo(() => {
51+ return isMacOs
52+ ? 'Download the Client for Mac'
53+ : isWindows
54+ ? 'Download the Client for Windows'
55+ : 'Download the Client for Your OS';
56+ }, []);
57+
58+ const downloadUrl = useMemo(() => {
59+ return isMacOs
60+ ? `https://github.com/urbit/port/releases/latest/download/Port.dmg`
61+ : isWindows
62+ ? 'https://github.com/urbit/urbit/releases/download/latest/windows.tgz'
63+ : 'https://github.com/urbit/port/releases/download/latest';
64+ }, []);
65+
4866 useFadeIn();
4967
5068 useLifecycle(() => {
@@ -95,14 +113,10 @@ const MasterKeyTransfer = () => {
95113 justifyContent={'space-between'}>
96114 {error && <DangerBox>{error.toString()}</DangerBox>}
97115 <ActivateButton
98− onClick={() =>
99− window.open(
100− 'https://github.com/urbit/port/releases/latest/download/Port.dmg'
101− )
102− }
116+ onClick={() => window.open(downloadUrl)}
103117 disabled={error}
104118 success={true}>
105− Download the Client for Mac
119+ {downloadButtonLabel}
106120 </ActivateButton>
107121 <Anchor
108122 href="https://urbit.org/getting-started/cli"
@@ -120,7 +134,7 @@ const MasterKeyTransfer = () => {
120134 </Anchor>
121135 </Box>
122136 );
123− }, [error]);
137+ }, [downloadButtonLabel, downloadUrl, error]);
124138
125139 return (
126140 <View centered={true}>