import React from 'react' import {View} from 'react-native' import {useLingui} from '@lingui/react' import {Trans, msg} from '@lingui/macro' import {atoms as a, useBreakpoints, useTheme} from '#/alf' import * as Dialog from '#/components/Dialog' import {Text, P} from '#/components/Typography' import {Button, ButtonText} from '#/components/Button' import {InlineLink, Link} from '#/components/Link' import {getAgent, useSession} from '#/state/session' export function ExportCarDialog({ control, }: { control: Dialog.DialogOuterProps['control'] }) { const {_} = useLingui() const t = useTheme() const {gtMobile} = useBreakpoints() const {currentAccount} = useSession() const downloadUrl = React.useMemo(() => { const agent = getAgent() if (!currentAccount || !agent.session) { return '' // shouldnt ever happen } // eg: https://bsky.social/xrpc/com.atproto.sync.getRepo?did=did:plc:ewvi7nxzyoun6zhxrhs64oiz const url = new URL(agent.pdsUrl || agent.service) url.pathname = '/xrpc/com.atproto.sync.getRepo' url.searchParams.set('did', agent.session.did) return url.toString() }, [currentAccount]) return ( Export My Data

Your account repository, containing all public data records, can be downloaded as a "CAR" file. This file does not include media embeds, such as images, or your private data, which must be fetched separately.

Download CAR file

This feature is in beta. You can read more about repository exports in{' '} this blogpost.

{!gtMobile && }
) }