mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 11:55:05 +03:00
Merge branch 'master' into fix-remove-dead-link-16953
This commit is contained in:
3 files changed
+23
-3
No files matched your search
@@ -50,7 +50,11 @@ const NavigationMenuHome = () => {
|
||||
>
|
||||
{link?.icon && <HomeMenuIconPicker icon={link.icon} />}
|
||||
{link.label}
|
||||
{link.community && <Badge size="small">Community</Badge>}
|
||||
{link.community && (
|
||||
<Badge size="small" color="scale">
|
||||
Community
|
||||
</Badge>
|
||||
)}
|
||||
</li>
|
||||
</a>
|
||||
</Link>
|
||||
|
||||
@@ -216,8 +216,7 @@ export default {
|
||||
},
|
||||
dot: '-ml-0.5 mr-1.5 h-2 w-2 rounded-full',
|
||||
color: {
|
||||
brand: 'bg-brand bg-opacity-100 text-background border border-brand-400',
|
||||
alt: 'bg-brand-500 text-brand-600 border border-brand-400',
|
||||
brand: 'bg-brand-500 text-brand-600 border border-brand-400',
|
||||
scale: 'bg-scale-200 text-scale-1100 border border-scale-700',
|
||||
tomato: `bg-tomato-200 text-tomato-1100 border border-tomato-700`,
|
||||
red: `bg-red-200 text-red-1100 border border-red-700`,
|
||||
|
||||
@@ -35,6 +35,7 @@ import { Project } from 'types'
|
||||
import DisabledStateForFreeTier from './DisabledStateForFreeTier'
|
||||
import { CATEGORY_OPTIONS, SERVICE_OPTIONS, SEVERITY_OPTIONS } from './Support.constants'
|
||||
import { formatMessage, uploadAttachments } from './SupportForm.utils'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
const MAX_ATTACHMENTS = 5
|
||||
const INCLUDE_DISCUSSIONS = ['Problem', 'Database_unresponsive']
|
||||
@@ -45,6 +46,7 @@ export interface SupportFormProps {
|
||||
|
||||
const SupportForm = ({ setSentCategory }: SupportFormProps) => {
|
||||
const { ui } = useStore()
|
||||
const { isReady } = useRouter()
|
||||
const { ref, subject, category, message } = useParams()
|
||||
|
||||
const uploadButtonRef = useRef()
|
||||
@@ -270,6 +272,21 @@ const SupportForm = ({ setSentCategory }: SupportFormProps) => {
|
||||
}
|
||||
}, [isSuccessProjects, isSuccessOrganizations])
|
||||
|
||||
// Populate fields when router is ready, required when navigating to
|
||||
// support form on a refresh browser session
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
useEffect(() => {
|
||||
if (isReady) {
|
||||
const updatedValues = {
|
||||
projectRef: ref,
|
||||
subject,
|
||||
category: selectedCategoryFromUrl?.value,
|
||||
message,
|
||||
}
|
||||
resetForm({ values: updatedValues, initialValues: updatedValues })
|
||||
}
|
||||
}, [isReady])
|
||||
|
||||
return (
|
||||
<div className="space-y-8 w-[620px]">
|
||||
<div className="px-6">
|
||||
|
||||
Reference in new issue
Block a user