Next.js Supabase V3 (#463)
Version 3 of the kit: - Radix UI replaced with Base UI (using the Shadcn UI patterns) - next-intl replaces react-i18next - enhanceAction deprecated; usage moved to next-safe-action - main layout now wrapped with [locale] path segment - Teams only mode - Layout updates - Zod v4 - Next.js 16.2 - Typescript 6 - All other dependencies updated - Removed deprecated Edge CSRF - Dynamic Github Action runner
This commit is contained in:
committed by
GitHub
parent
4912e402a3
commit
7ebff31475
@@ -5,9 +5,6 @@ import { Fragment, useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import Link from 'next/link';
|
||||
import { useRouter, useSearchParams } from 'next/navigation';
|
||||
|
||||
import { envVariables } from '@/app/variables/lib/env-variables-model';
|
||||
import { updateEnvironmentVariableAction } from '@/app/variables/lib/server-actions';
|
||||
import { EnvModeSelector } from '@/components/env-mode-selector';
|
||||
import {
|
||||
ChevronsUpDownIcon,
|
||||
Copy,
|
||||
@@ -44,6 +41,10 @@ import { cn } from '@kit/ui/utils';
|
||||
import { AppEnvState, EnvVariableState } from '../lib/types';
|
||||
import { DynamicFormInput } from './dynamic-form-input';
|
||||
|
||||
import { envVariables } from '@/app/variables/lib/env-variables-model';
|
||||
import { updateEnvironmentVariableAction } from '@/app/variables/lib/server-actions';
|
||||
import { EnvModeSelector } from '@/components/env-mode-selector';
|
||||
|
||||
export function AppEnvironmentVariablesManager({
|
||||
state,
|
||||
}: React.PropsWithChildren<{
|
||||
@@ -731,13 +732,15 @@ function FilterSwitcher(props: {
|
||||
|
||||
return (
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button variant="outline" className="font-normal">
|
||||
{buttonLabel()}
|
||||
<DropdownMenuTrigger
|
||||
render={
|
||||
<Button variant="outline" className="font-normal">
|
||||
{buttonLabel()}
|
||||
|
||||
<ChevronsUpDownIcon className="text-muted-foreground ml-1 h-3 w-3" />
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<ChevronsUpDownIcon className="text-muted-foreground ml-1 h-3 w-3" />
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
|
||||
<DropdownMenuContent>
|
||||
<DropdownMenuCheckboxItem
|
||||
@@ -886,38 +889,41 @@ function Summary({ appState }: { appState: AppEnvState }) {
|
||||
|
||||
<TooltipProvider>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
variant="outline"
|
||||
size={'sm'}
|
||||
onClick={() => {
|
||||
let data = '';
|
||||
<TooltipTrigger
|
||||
render={
|
||||
<Button
|
||||
variant="outline"
|
||||
size={'sm'}
|
||||
onClick={() => {
|
||||
let data = '';
|
||||
|
||||
const groups = getGroups(appState, () => true);
|
||||
const groups = getGroups(appState, () => true);
|
||||
|
||||
groups.forEach((group) => {
|
||||
data += `# ${group.category}\n`;
|
||||
groups.forEach((group) => {
|
||||
data += `# ${group.category}\n`;
|
||||
|
||||
group.variables.forEach((variable) => {
|
||||
data += `${variable.key}=${variable.effectiveValue}\n`;
|
||||
group.variables.forEach((variable) => {
|
||||
data += `${variable.key}=${variable.effectiveValue}\n`;
|
||||
});
|
||||
|
||||
data += '\n';
|
||||
});
|
||||
|
||||
data += '\n';
|
||||
});
|
||||
const promise = copyToClipboard(data);
|
||||
|
||||
const promise = copyToClipboard(data);
|
||||
|
||||
toast.promise(promise, {
|
||||
loading: 'Copying environment variables...',
|
||||
success: 'Environment variables copied to clipboard.',
|
||||
error: 'Failed to copy environment variables to clipboard',
|
||||
});
|
||||
}}
|
||||
>
|
||||
<CopyIcon className={'mr-2 h-4 w-4'} />
|
||||
<span>Copy env file to clipboard</span>
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
toast.promise(promise, {
|
||||
loading: 'Copying environment variables...',
|
||||
success: 'Environment variables copied to clipboard.',
|
||||
error:
|
||||
'Failed to copy environment variables to clipboard',
|
||||
});
|
||||
}}
|
||||
>
|
||||
<CopyIcon className={'mr-2 h-4 w-4'} />
|
||||
<span>Copy env file to clipboard</span>
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
|
||||
<TooltipContent>
|
||||
Copy environment variables to clipboard. You can place it in your
|
||||
|
||||
Reference in New Issue
Block a user