Skip to content

Commit

Permalink
Remove sample coupons
Browse files Browse the repository at this point in the history
  • Loading branch information
Maruchin1 committed Apr 12, 2023
1 parent 2ecc3b4 commit dcdd9b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,3 @@ data class Coupon(
val price: Points,
val image: URL,
)

val sampleCoupons = listOf(
Coupon(
id = ID("1"),
name = "Cheesburger with fries",
price = Points(200),
image = URL("https://raw.githubusercontent.com/Maruchin1/domain-driven-android/master/images/cheesburger_with_fries_coupon.jpeg"),
),
Coupon(
id = ID("2"),
name = "Chicekburger with fries",
price = Points(150),
image = URL("https://raw.githubusercontent.com/Maruchin1/domain-driven-android/master/images/chickenburger_with_fries_coupon.jpeg"),
),
Coupon(
id = ID("3"),
name = "Chicken nuggets with fries",
price = Points(250),
image = URL("https://raw.githubusercontent.com/Maruchin1/domain-driven-android/master/images/chicken_nuggets_with_fries_coupon.jpeg"),
),
Coupon(
id = ID("4"),
name = "2 x Milkshake",
price = Points(100),
image = URL("https://raw.githubusercontent.com/Maruchin1/domain-driven-android/master/images/two_milkshakes_coupon.jpeg"),
),
Coupon(
id = ID("5"),
name = "2 x Soda drink",
price = Points(50),
image = URL("https://raw.githubusercontent.com/Maruchin1/domain-driven-android/master/images/two_soda_drinks_coupon.jpeg"),
),
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.maruchin.domaindrivenandroid.ui.couponPreview

import androidx.compose.animation.AnimatedContent
import androidx.compose.animation.ExperimentalAnimationApi
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.aspectRatio
Expand Down Expand Up @@ -35,10 +36,9 @@ import coil.compose.AsyncImage
import com.google.accompanist.placeholder.PlaceholderHighlight
import com.google.accompanist.placeholder.material.placeholder
import com.google.accompanist.placeholder.material.shimmer
import com.maruchin.domaindrivenandroid.data.coupon.sampleCoupons
import com.maruchin.domaindrivenandroid.ui.DomainDrivenAndroidTheme

@OptIn(ExperimentalMaterial3Api::class)
@OptIn(ExperimentalMaterial3Api::class, ExperimentalAnimationApi::class)
@Composable
fun CouponPreviewScreen(state: CouponPreviewUiState, onBack: () -> Unit, onCollect: () -> Unit) {
Scaffold(
Expand Down Expand Up @@ -195,29 +195,5 @@ private fun DefaultPreview(@PreviewParameter(UiStateProvider::class) state: Coup
private class UiStateProvider : PreviewParameterProvider<CouponPreviewUiState> {
override val values = sequenceOf(
CouponPreviewUiState(),
CouponPreviewUiState(
isLoading = false,
couponId = sampleCoupons[0].id,
imageUrl = sampleCoupons[0].image.toString(),
couponName = sampleCoupons[0].name,
price = sampleCoupons[0].price.toString(),
activation = ActivationUiState.Collect,
),
CouponPreviewUiState(
isLoading = false,
couponId = sampleCoupons[0].id,
imageUrl = sampleCoupons[0].image.toString(),
couponName = sampleCoupons[0].name,
price = sampleCoupons[0].price.toString(),
activation = ActivationUiState.Active(),
),
CouponPreviewUiState(
isLoading = false,
couponId = sampleCoupons[0].id,
imageUrl = sampleCoupons[0].image.toString(),
couponName = sampleCoupons[0].name,
price = sampleCoupons[0].price.toString(),
activation = ActivationUiState.Active(code = "123456", isProcessing = false),
),
)
}

0 comments on commit dcdd9b3

Please sign in to comment.