Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
awebcode committed Oct 11, 2024
1 parent e63904c commit 6397836
Show file tree
Hide file tree
Showing 5,097 changed files with 154,651 additions and 35 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 4 additions & 0 deletions client/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ const nextConfig = withStoreConfig({
protocol: "https",
hostname: "medusa-server-testing.s3.us-east-1.amazonaws.com",
},
{
protocol: "https",
hostname: "res.cloudinary.com",
},
],
},
})
Expand Down
46 changes: 46 additions & 0 deletions client/src/modules/layout/templates/footer/NewsLetter.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
"use client"
import { Button, Input } from "@medusajs/ui"
import axios from "axios"
import { useState } from "react"

export default function NewsletterForm() {
const [email, setEmail] = useState("")

function subscribe(e: React.FormEvent<HTMLFormElement>) {
e.preventDefault()
if (!email) {
return
}

axios
.post(
`${process.env.NEXT_PUBLIC_MEDUSA_BACKEND_URL}/mailchimp/subscribe`,
{
email,
}
)
.then((e) => {
alert("Subscribed successfully!")
setEmail("")
})
.catch((e) => {
console.error(e)
alert("An error occurred")
})
}

return (
<form onSubmit={subscribe}>
<h2>Sign Up for our newsletter</h2>
<Input
type="email"
name="email"
id="email"
placeholder="example@gmail.com"
value={email}
onChange={(e) => setEmail(e.target.value)}
/>
<Button type="submit">Subscribe</Button>
</form>
)
}
5 changes: 5 additions & 0 deletions client/src/modules/layout/templates/footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { getCategoriesList, getCollectionsList } from "@lib/data"

import LocalizedClientLink from "@modules/common/components/localized-client-link"
import MedusaCTA from "@modules/layout/components/medusa-cta"
import NewsletterForm from "./NewsLetter"

export default async function Footer() {
const { collections } = await getCollectionsList(0, 6)
Expand All @@ -21,6 +22,10 @@ export default async function Footer() {
Medusa Store
</LocalizedClientLink>
</div>
{/* Newsletter */}
<div>
<NewsletterForm />
</div>
<div className="text-small-regular gap-10 md:gap-x-16 grid grid-cols-2 sm:grid-cols-3">
{product_categories && product_categories?.length > 0 && (
<div className="flex flex-col gap-y-2">
Expand Down
47 changes: 47 additions & 0 deletions node_modules/.yarn-integrity

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions node_modules/@nodelib/fs.scandir/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

171 changes: 171 additions & 0 deletions node_modules/@nodelib/fs.scandir/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions node_modules/@nodelib/fs.scandir/out/adapters/fs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions node_modules/@nodelib/fs.scandir/out/constants.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions node_modules/@nodelib/fs.scandir/out/constants.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions node_modules/@nodelib/fs.scandir/out/index.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6397836

Please sign in to comment.