-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added variants, tweaked styling. Started building cart page
- Loading branch information
1 parent
c76584b
commit 144f48a
Showing
10 changed files
with
196 additions
and
32 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 49 additions & 7 deletions
56
src/components/product/listing/description/ProductDescription.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { | ||
IonCol, | ||
IonContent, | ||
IonFooter, | ||
IonGrid, | ||
IonHeader, | ||
IonIcon, | ||
IonImg, | ||
IonPage, | ||
IonRow, | ||
IonSplitPane, | ||
IonTitle, | ||
IonToolbar, | ||
} from "@ionic/react"; | ||
import Commerce from "@chec/commerce.js"; | ||
import { useEffect, useState } from "react"; | ||
|
||
const CartModal: React.FC = () => { | ||
const [cart, setCart] = useState([]); | ||
|
||
useEffect(() => { | ||
const commerce = new Commerce(process.env.REACT_APP_CHEC_PUBLIC_KEY); | ||
commerce.cart.retrieve().then((cart) => setCart(cart)); | ||
}, []); | ||
|
||
console.log(cart); | ||
|
||
return ( | ||
<IonPage> | ||
<IonContent fullscreen>Cart</IonContent> | ||
<IonFooter> | ||
<IonToolbar> | ||
<IonTitle>Powered By Commerce.JS</IonTitle> | ||
</IonToolbar> | ||
</IonFooter> | ||
</IonPage> | ||
); | ||
}; | ||
|
||
export default CartModal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.ion-page ion-grid.home { | ||
padding-top: 44px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { modalController } from "@ionic/core"; | ||
|
||
export const addModal = async (component, presentingElement) => { | ||
if (presentingElement.current != null) { | ||
const modal = await modalController.create({ | ||
component, | ||
swipeToClose: true, | ||
presentingElement: presentingElement.current, | ||
}); | ||
await modal.present(); | ||
} | ||
}; |