feat(cms): recover drafts and failed imports with verified UI workflows
This commit is contained in:
1 parent
410a1e466c
commit
88790d1a0d
84 files changed
+3952
-288
No files matched your search
@@ -0,0 +1,35 @@
|
||||
import { useState } from "react";
|
||||
import { useFurnitureJobs } from "@/components/admin/studio/use-furniture-jobs";
|
||||
|
||||
export function FurnitureJobsHarness() {
|
||||
const [completions, setCompletions] = useState(0);
|
||||
const history = useFurnitureJobs(
|
||||
() => setCompletions((value) => value + 1),
|
||||
true,
|
||||
);
|
||||
return (
|
||||
<section aria-label="Import history hook">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
void history.refresh();
|
||||
void history.refresh();
|
||||
}}
|
||||
>
|
||||
Refresh twice
|
||||
</button>
|
||||
<button type="button" onClick={() => void history.navigate("next")}>
|
||||
Next page
|
||||
</button>
|
||||
<button type="button" onClick={() => void history.navigate("previous")}>
|
||||
Previous page
|
||||
</button>
|
||||
<output aria-label="Page">{history.page}</output>
|
||||
<output aria-label="Completions">{completions}</output>
|
||||
<output aria-label="Loading">{String(history.loading)}</output>
|
||||
<output aria-label="Jobs">
|
||||
{history.jobs.map((job) => `${job.id}:${job.state}`).join(",")}
|
||||
</output>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user