ui(drawer): reorder tabs Config first, default to Config
This commit is contained in:
@@ -60,11 +60,11 @@ describe('CheckpointDetailDrawer', () => {
|
||||
expect(screen.getByText(/alice/)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('Logs tab is selected by default', () => {
|
||||
it('Config tab is selected by default', () => {
|
||||
renderDrawer();
|
||||
// Tabs from DS may render as buttons or tabs role — be lenient on the query
|
||||
const logsTab = screen.getByText(/^logs$/i);
|
||||
expect(logsTab).toBeInTheDocument();
|
||||
const configTab = screen.getByText(/^config$/i);
|
||||
expect(configTab).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('disables Restore when JAR is pruned', () => {
|
||||
|
||||
@@ -24,7 +24,7 @@ type TabId = 'logs' | 'config';
|
||||
export function CheckpointDetailDrawer({
|
||||
open, onClose, deployment, version, appSlug, envSlug, onRestore, currentForm,
|
||||
}: Props) {
|
||||
const [tab, setTab] = useState<TabId>('logs');
|
||||
const [tab, setTab] = useState<TabId>('config');
|
||||
const archived = !version;
|
||||
|
||||
const title = (
|
||||
@@ -67,8 +67,8 @@ export function CheckpointDetailDrawer({
|
||||
active={tab}
|
||||
onChange={(t) => setTab(t as TabId)}
|
||||
tabs={[
|
||||
{ value: 'logs', label: 'Logs' },
|
||||
{ value: 'config', label: 'Config' },
|
||||
{ value: 'logs', label: 'Logs' },
|
||||
]}
|
||||
/>
|
||||
<div className={styles.tabContent}>
|
||||
|
||||
Reference in New Issue
Block a user