Skip to content

Commit

Permalink
add product list and skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
eihabkhan committed Mar 8, 2024
1 parent f6980ff commit 689965d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
Binary file added assets/illustrations/cat-in-a-box.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions components/ProductsSkeleton.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<script setup lang="ts">
import { PrimaryButton } from '@youcan/ui-vue3'
function handleClick() {
window.parent.location =
'https://seller-area.youcanshop.dev/admin/products/create?approved=1'
}
</script>

<template>
<img src="/assets/illustrations/cat-in-a-box.png" alt="Meow meow" />
<div class="flex flex-col justify-center items-center gap-4">
<h2 class="text-2xl font-semibold text-gray-400">
Oops! You don’t have any products.
</h2>
<PrimaryButton @click="handleClick"> Create Product </PrimaryButton>
</div>
</template>
7 changes: 4 additions & 3 deletions pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<script setup lang="ts">
import { Product } from '#components'
import { Product, ProductsSkeleton } from '#components'
</script>

<template>
<main class="max-w-[1000px] mx-auto">
<div class="flex flex-col gap-4">
<h1 class="text-4xl font-bold">Your products</h1>
<div
class="border border-gray-200 p-4 bg-[#F7F7F7] rounded-lg h-[calc(100vh-220px)] overflow-y-scroll"
class="border border-gray-200 rounded-lg h-[calc(100vh-220px)] overflow-y-scroll"
>
<ul class="flex flex-col gap-4">
<!-- <ProductsSkeleton /> -->
<ul class="flex flex-col gap-4 p-4 bg-[#F7F7F7]">
<Product />
<Product />
<Product />
Expand Down

0 comments on commit 689965d

Please sign in to comment.