@@ -10,7 +10,11 @@ import {
1010 ServerStackIcon ,
1111 Squares2X2Icon ,
1212} from "@heroicons/react/20/solid" ;
13+ import { useLocation } from "react-use" ;
1314import { TaskIcon } from "~/assets/icons/TaskIcon" ;
15+ import { useEnvironment } from "~/hooks/useEnvironment" ;
16+ import { useOrganization } from "~/hooks/useOrganizations" ;
17+ import { useProject } from "~/hooks/useProject" ;
1418import { type MinimumEnvironment } from "~/presenters/SelectBestEnvironmentPresenter.server" ;
1519import {
1620 docsPath ,
@@ -22,20 +26,15 @@ import {
2226import { InlineCode } from "./code/InlineCode" ;
2327import { environmentFullTitle } from "./environments/EnvironmentLabel" ;
2428import { Feedback } from "./Feedback" ;
29+ import { EnvironmentSelector } from "./navigation/EnvironmentSelector" ;
2530import { Button , LinkButton } from "./primitives/Buttons" ;
2631import { Header1 } from "./primitives/Headers" ;
2732import { InfoPanel } from "./primitives/InfoPanel" ;
2833import { Paragraph } from "./primitives/Paragraph" ;
2934import { StepNumber } from "./primitives/StepNumber" ;
35+ import { TextLink } from "./primitives/TextLink" ;
3036import { InitCommandV3 , PackageManagerProvider , TriggerDevStepV3 } from "./SetupCommands" ;
3137import { StepContentContainer } from "./StepContentContainer" ;
32- import { useLocation } from "react-use" ;
33- import { useEnvironment } from "~/hooks/useEnvironment" ;
34- import { useOrganization } from "~/hooks/useOrganizations" ;
35- import { useProject } from "~/hooks/useProject" ;
36- import { TextLink } from "./primitives/TextLink" ;
37- import { EnvironmentSelector } from "./navigation/EnvironmentSelector" ;
38- import { Pi } from "lucide-react" ;
3938
4039export function HasNoTasksDev ( ) {
4140 return (
@@ -104,18 +103,15 @@ export function SchedulesNoPossibleTaskPanel() {
104103 icon = { ClockIcon }
105104 iconClassName = "text-sun-500"
106105 panelClassName = "max-w-full"
106+ to = { docsPath ( "v3/tasks-scheduled" ) }
107+ buttonLabel = "How to schedule tasks"
108+ buttonVariant = "docs/small"
109+ buttonLeadingIcon = { BookOpenIcon }
107110 >
108111 < Paragraph spacing variant = "small" >
109112 You have no scheduled tasks in your project. Before you can schedule a task you need to
110113 create a < InlineCode > schedules.task</ InlineCode > .
111114 </ Paragraph >
112- < LinkButton
113- to = { docsPath ( "v3/tasks-scheduled" ) }
114- variant = "docs/medium"
115- LeadingIcon = { BookOpenIcon }
116- >
117- View the docs
118- </ LinkButton >
119115 </ InfoPanel >
120116 ) ;
121117}
@@ -166,14 +162,15 @@ export function BatchesNone() {
166162 icon = { Squares2X2Icon }
167163 iconClassName = "text-blue-500"
168164 panelClassName = "max-w-full"
165+ to = { docsPath ( "triggering" ) }
166+ buttonLabel = "How to trigger batches"
167+ buttonVariant = "docs/small"
168+ buttonLeadingIcon = { BookOpenIcon }
169169 >
170170 < Paragraph spacing variant = "small" >
171171 You have no batches in this environment. You can trigger batches from your backend or from
172172 inside other tasks.
173173 </ Paragraph >
174- < LinkButton to = { docsPath ( "triggering" ) } variant = "docs/medium" LeadingIcon = { BookOpenIcon } >
175- How to trigger batches
176- </ LinkButton >
177174 </ InfoPanel >
178175 ) ;
179176}
@@ -182,23 +179,20 @@ export function TestHasNoTasks() {
182179 const organization = useOrganization ( ) ;
183180 const project = useProject ( ) ;
184181 const environment = useEnvironment ( ) ;
185-
186182 return (
187183 < InfoPanel
188- title = "No tasks to test"
184+ title = "You don't have any tasks to test"
189185 icon = { BeakerIcon }
190186 iconClassName = "text-lime-500"
191187 panelClassName = "max-w-full"
188+ to = { v3EnvironmentPath ( organization , project , environment ) }
189+ buttonLabel = "Create a task"
192190 >
193191 < Paragraph spacing variant = "small" >
194- You have no tasks in this environment.
192+ Before testing a task, you must first create one. Follow the instructions on the{ " " }
193+ < TextLink to = { v3EnvironmentPath ( organization , project , environment ) } > Tasks page</ TextLink > { " " }
194+ to create a task, then return here to test it.
195195 </ Paragraph >
196- < LinkButton
197- to = { v3EnvironmentPath ( organization , project , environment ) }
198- variant = "tertiary/medium"
199- >
200- Add tasks
201- </ LinkButton >
202196 </ InfoPanel >
203197 ) ;
204198}
@@ -376,20 +370,19 @@ export function QueuesHasNoTasks() {
376370
377371 return (
378372 < InfoPanel
379- title = "You have no queues"
373+ title = "You don't have any queues"
380374 icon = { RectangleStackIcon }
381375 iconClassName = "text-blue-500"
382- panelClassName = "max-w-full"
376+ panelClassName = "max-w-md"
377+ to = { v3EnvironmentPath ( organization , project , environment ) }
378+ buttonLabel = "Create a task"
383379 >
384380 < Paragraph spacing variant = "small" >
385- This means you haven't got any tasks yet in this environment.
381+ Queues will appear here when you have created a task in this environment. Follow the
382+ instructions on the{ " " }
383+ < TextLink to = { v3EnvironmentPath ( organization , project , environment ) } > Tasks page</ TextLink > { " " }
384+ to create a task, then return here to see its queue.
386385 </ Paragraph >
387- < LinkButton
388- to = { v3EnvironmentPath ( organization , project , environment ) }
389- variant = "tertiary/medium"
390- >
391- Add tasks
392- </ LinkButton >
393386 </ InfoPanel >
394387 ) ;
395388}
0 commit comments