mirror of
https://github.com/supabase/supabase.git
synced 2026-10-17 23:29:08 +03:00
* Add lucide-react to docs (to make the autocomplete work). * Migrate the docs app icons. * Migrate the ui-patterns. * Remove the old icons from ui package. * Migrate the www app from react-feather icons. * Migrate all of studio icons. * Migrate the only component in design-system. * Fix an old import in ui package. Revert an import in docs app. * Fix some pages in www. * Remove unneeded files used in generation of icons. * Fix a prettier error. * Fix more issues in www. * Fix an issue in Log Date picker. * Replace all string sizes with number sizes because the icons grew in some cases. * Fix more imports in security page. * Fix an extra import. * Remove the size prop from all icons if they're in a button and they match the button size. * Minor fixes for docs and www. --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
78 lines
2.5 KiB
TypeScript
78 lines
2.5 KiB
TypeScript
import Link from 'next/link'
|
|
import { useState } from 'react'
|
|
|
|
import {
|
|
AccessTokenList,
|
|
NewAccessTokenButton,
|
|
NewTokenBanner,
|
|
} from 'components/interfaces/Account'
|
|
import AccountLayout from 'components/layouts/AccountLayout/AccountLayout'
|
|
import { FormHeader } from 'components/ui/Forms/FormHeader'
|
|
import { NewAccessToken } from 'data/access-tokens/access-tokens-create-mutation'
|
|
import type { NextPageWithLayout } from 'types'
|
|
import { Alert, Button } from 'ui'
|
|
import { ExternalLink } from 'lucide-react'
|
|
|
|
const UserAccessTokens: NextPageWithLayout = () => {
|
|
const [newToken, setNewToken] = useState<NewAccessToken | undefined>()
|
|
|
|
return (
|
|
<div className="1xl:px-28 mx-auto flex flex-col px-5 pt-6 pb-14 lg:px-16 xl:px-24 2xl:px-32">
|
|
<div className="flex items-center justify-between">
|
|
<div>
|
|
<FormHeader
|
|
title="Access Tokens"
|
|
description="Personal access tokens can be used with our Management API or CLI."
|
|
/>
|
|
</div>
|
|
<div className="flex items-center space-x-4 mb-6">
|
|
<div className="flex items-center space-x-2">
|
|
<Button asChild type="default" icon={<ExternalLink strokeWidth={1.5} />}>
|
|
<Link
|
|
href="https://supabase.com/docs/reference/api/introduction"
|
|
target="_blank"
|
|
rel="noreferrer"
|
|
>
|
|
API Docs
|
|
</Link>
|
|
</Button>
|
|
<Button asChild type="default" icon={<ExternalLink strokeWidth={1.5} />}>
|
|
<Link
|
|
href="https://supabase.com/docs/reference/cli/start"
|
|
target="_blank"
|
|
rel="noreferrer"
|
|
>
|
|
CLI docs
|
|
</Link>
|
|
</Button>
|
|
</div>
|
|
<NewAccessTokenButton onCreateToken={setNewToken} />
|
|
</div>
|
|
</div>
|
|
<div className="flex items-center justify-between">
|
|
<Alert
|
|
withIcon
|
|
className="mb-6 w-full"
|
|
variant="warning"
|
|
title="Personal access tokens can be used to control your whole account and use features added in the future. Be careful when sharing them!"
|
|
/>
|
|
</div>
|
|
<div className="space-y-4">
|
|
{newToken && <NewTokenBanner token={newToken} />}
|
|
<AccessTokenList />
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
UserAccessTokens.getLayout = (page) => (
|
|
<AccountLayout
|
|
title="Access Tokens"
|
|
breadcrumbs={[{ key: 'supabase-account-tokens', label: 'Access Tokens' }]}
|
|
>
|
|
{page}
|
|
</AccountLayout>
|
|
)
|
|
|
|
export default UserAccessTokens
|