Kaynağa Gözat

Small tweaks, sample product clean-up, last step cleanup

Rares Capilnar 2 yıl önce
ebeveyn
işleme
31bf746266

+ 4 - 3
src/admin/onboarding-flow/onboarding-flow.tsx

@@ -63,6 +63,7 @@ const OnboardingFlow = (props: ExtensionProps) => {
 
   useEffect(() => {
     setOpenStep(currentStep);
+    if (currentStep === STEP_FLOW[STEP_FLOW.length - 1]) setCompleted(true);
   }, [currentStep]);
 
   if (
@@ -250,9 +251,9 @@ const OnboardingFlow = (props: ExtensionProps) => {
               </>
             )}
           </div>
-          {!completed && (
+          {
             <div className="mt-5">
-              {Steps.map(step => {
+              {(!completed ? Steps : Steps.slice(-1)).map(step => {
                 const isComplete = isStepComplete(step.id);
                 const isCurrent = currentStep === step.id;
                 return (
@@ -280,7 +281,7 @@ const OnboardingFlow = (props: ExtensionProps) => {
                 );
               })}
             </div>
-          )}
+          }
         </Accordion>
       </Container>
     </>

+ 12 - 6
src/admin/onboarding-flow/orders/order-detail.tsx

@@ -19,15 +19,18 @@ const OrderDetail = () => {
         some essential guides to kickstart your development with Medusa.
       </p>
       <div className="grid grid-cols-2 gap-4 mt-5 pb-5 mb-5 border-b border-gray-300 border-solid">
-        <a href="#">
+        <a
+          href="https://medusa-docs-git-docs-onboarding-material-medusajs.vercel.app/starters/nextjs-medusa-starter?path=simple-quickstart"
+          target="_blank"
+        >
           <div
-            className="p-4 rounded-rounded flex flex-col bg-slate-50"
+            className="p-4 rounded-rounded flex items-center bg-slate-50"
             style={{
               boxShadow:
                 "0px 0px 0px 1px rgba(17, 24, 28, 0.08), 0px 1px 2px -1px rgba(17, 24, 28, 0.08), 0px 2px 4px rgba(17, 24, 28, 0.04)",
             }}
           >
-            <div className="mb-base">
+            <div className="mr-base">
               <IconBadge>
                 <DollarSignIcon />
               </IconBadge>
@@ -43,15 +46,18 @@ const OrderDetail = () => {
             </div>
           </div>
         </a>
-        <a href="#">
+        <a
+          href="https://medusa-docs-git-docs-onboarding-material-medusajs.vercel.app/recipes"
+          target="_blank"
+        >
           <div
-            className="p-4 rounded-rounded flex flex-col bg-slate-50"
+            className="p-4 rounded-rounded items-center flex bg-slate-50"
             style={{
               boxShadow:
                 "0px 0px 0px 1px rgba(17, 24, 28, 0.08), 0px 1px 2px -1px rgba(17, 24, 28, 0.08), 0px 2px 4px rgba(17, 24, 28, 0.04)",
             }}
           >
-            <div className="mb-base">
+            <div className="mr-base">
               <IconBadge>
                 <ComputerDesktopIcon />
               </IconBadge>

+ 3 - 12
src/admin/onboarding-flow/orders/orders-list.tsx

@@ -55,11 +55,10 @@ const OrdersList = ({ onNext, isComplete, data }: StepContentProps) => {
   return (
     <>
       <div className="py-4">
-        <p>You can now create an order.</p>
+        <p>We can now create an order.</p>
         <p>
-          To create an order, you can choose to create a sample order, use
-          Swagger UI to simulate the necessary API requests to create an order,
-          or use Medusa's Next.js Storefront Starter.
+          With a Product created, we can now place an Order. Click the button
+          below to create a sample order.
         </p>
       </div>
       <div className="flex gap-2">
@@ -73,14 +72,6 @@ const OrdersList = ({ onNext, isComplete, data }: StepContentProps) => {
             Create a sample order
           </Button>
         )}
-        <a
-          href="https://docs.medusajs.com/starters/nextjs-medusa-starter"
-          target="_blank"
-        >
-          <Button variant="secondary" size="small">
-            Install Next.js Starter Storefront
-          </Button>
-        </a>
       </div>
     </>
   );

+ 2 - 2
src/admin/onboarding-flow/products/products-list.tsx

@@ -16,8 +16,8 @@ const ProductsList = ({ onNext, isComplete }: StepContentProps) => {
   const createSampleProduct = async () => {
     createProduct(
       {
-        title: "A coat or something idk",
-        description: "Lorem Ipsum Dolor Sit Amet",
+        title: "Medusa T-Shirt",
+        description: "Comfy t-shirt with Medusa logo",
         is_giftcard: false,
         discountable: false,
         options: [{ title: "Size" }],