Files
Ivan VasilovandJoshen Lim 05a542ccea chore: Migrate all feather icons to lucide icons (#29038)
* 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>
2024-09-04 19:46:21 +08:00

60 lines
1.8 KiB
TypeScript

import VercelIntegrationLayout from 'components/layouts/VercelIntegrationLayout'
import { Loader } from 'lucide-react'
import { observer, useLocalObservable } from 'mobx-react-lite'
import { createContext, useEffect, useState } from 'react'
import { Button } from 'ui'
const PageContext = createContext(null)
function IntegrationComplete() {
const PageState = useLocalObservable(() => ({
supabaseProjectRef: '',
next: '',
loadInitialData() {
this.getQueryParams()
},
getQueryParams() {
const params = new URLSearchParams(window.location.search)
this.next = params.get('next') as string
this.supabaseProjectRef = params.get('supabaseProjectRef') as string
},
}))
const [loading, setLoading] = useState(false)
useEffect(() => {
PageState.loadInitialData()
}, [])
function onContinue() {
setLoading(true)
window.location.href = PageState.next
}
return (
// @ts-ignore
<PageContext.Provider value={PageState}>
<VercelIntegrationLayout>
<div className="mx-auto max-w-sm">
<Loader className="animate-spin" size={30} />
<p className="pt-4 text-lg">Your new project is spinning up</p>
<p className="pt-2">This may take up to 2 mins, but you can continue on Vercel.</p>
<div className="py-4">
<a
href={`/project/${PageState.supabaseProjectRef}`}
target="_blank"
rel="noreferrer"
className="hover:text-green-1000"
>
Open Supabase Dashboard →
</a>
</div>
<Button disabled={loading} loading={loading} onClick={onContinue} block>
Finish
</Button>
</div>
</VercelIntegrationLayout>
</PageContext.Provider>
)
}
export default observer(IntegrationComplete)