Skip to content

Commit

Permalink
💫 pre-release
Browse files Browse the repository at this point in the history
  • Loading branch information
fuegovic authored May 10, 2024
2 parents 4b97332 + 88420df commit 65c64f9
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 14 deletions.
11 changes: 9 additions & 2 deletions components/Newsletter/SubscribeForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import toast, { Toaster } from 'react-hot-toast'
import validator from 'validator'
import style from './newsletterform.module.css'

const isDevelopment = true //TODO

const SubscribeForm = () => {
const [email, setEmail] = useState('')
const [isLoading, setIsLoading] = useState(false)
Expand Down Expand Up @@ -49,12 +51,17 @@ const SubscribeForm = () => {
<form onSubmit={handleSubmit} className={style[`form-container`]}>
<input
type="email"
placeholder="Enter your email"
placeholder={isDevelopment ? 'Coming soon...' : 'Enter your email'}
value={email}
onChange={(e) => setEmail(e.target.value)}
className={style[`email-input`]}
readOnly={isDevelopment}
/>
<button type="submit" className={style[`subscribe-button`]} disabled={isLoading}>
<button
type="submit"
className={style[`subscribe-button`]}
disabled={isLoading || isDevelopment}
>
{isLoading ? 'Subscribing...' : 'Subscribe'}
</button>
</form>
Expand Down
12 changes: 10 additions & 2 deletions components/Newsletter/UnsubscribeForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import toast, { Toaster } from 'react-hot-toast'
import validator from 'validator'
import style from './newsletterform.module.css'

const isDevelopment = true //TODO

const UnsubscribeForm = () => {
const [email, setEmail] = useState('')
const [isLoading, setIsLoading] = useState(false)
Expand Down Expand Up @@ -43,18 +45,24 @@ const UnsubscribeForm = () => {

return (
<div className={style.container}>
<br />
<Toaster position="bottom-center" reverseOrder={false} />
<div className={style[`form-wrapper`]}>
<h2 className={style[`form-title`]}>Unsubscribe From Our Newsletter</h2>
<form onSubmit={handleSubmit} className={style[`form-container`]}>
<input
type="email"
placeholder="Enter your email"
placeholder={isDevelopment ? 'Coming soon...' : 'Enter your email'}
value={email}
onChange={(e) => setEmail(e.target.value)}
className={style[`email-input`]}
readOnly={isDevelopment}
/>
<button type="submit" className={style[`subscribe-button`]} disabled={isLoading}>
<button
type="submit"
className={style[`subscribe-button`]}
disabled={isLoading || isDevelopment}
>
{isLoading ? 'Unsubscribing...' : 'Unsubscribe'}
</button>
</form>
Expand Down
2 changes: 1 addition & 1 deletion next-sitemap.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: 'https://www.librechat.cfd',
siteUrl: 'https://www.librechat.ai',
generateRobotsTxt: true,
changefreq: 'daily',
exclude: ['*/_meta'],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"prettier": "pnpm lint:prettier --write",
"prepare": "husky"
},
"homepage": "https://www.librechat.cfd",
"homepage": "https://www.librechat.ai",
"dependencies": {
"@calcom/embed-react": "^1.5.0",
"@glidejs/glide": "^3.6.0",
Expand Down
2 changes: 1 addition & 1 deletion pages/404.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

# 🤷

[Submit an issue about broken links ↗](https://github.com/noreplylibrechatai/librechat.ai/issues/new?title=Found%20broken%20%60%2Fdocs%60%20link.%20Please%20fix!&labels=bug)
[Submit an issue about broken links ↗](https://github.com/LibreChat-AI/librechat.ai/issues/new?title=Found%20broken%20%60%2Fdocs%60%20link.%20Please%20fix!&labels=bug)

</div>
12 changes: 5 additions & 7 deletions theme.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const config: DocsThemeConfig = {
toc: {
backToTop: true,
},
docsRepositoryBase: 'https://github.com/noreplylibrechatai/librechat.ai/tree/main',
docsRepositoryBase: 'https://github.com/LibreChat-AI/librechat.ai/tree/main',
footer: {
content: <FooterMenu />,
},
Expand All @@ -63,12 +63,10 @@ const config: DocsThemeConfig = {
: '/images/socialcards/default-image.png'

const image = frontMatter.ogImage
? 'https://nextra.librechat.cfd' + frontMatter.ogImage // Use frontmatter image if available
? 'https://www.librechat.ai' + frontMatter.ogImage // Use frontmatter image if available
: defaultImage // Use default image based on path if frontmatter image is not available

const video = frontMatter.ogVideo
? 'https://nextra.librechat.cfd' + frontMatter.ogVideo //TODO Update URL
: null
const video = frontMatter.ogVideo ? 'https://www.librechat.ai' + frontMatter.ogVideo : null

return (
<>
Expand All @@ -83,8 +81,8 @@ const config: DocsThemeConfig = {
<meta property="og:image" content={image} />
<meta property="twitter:image" content={image} />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site:domain" content="librechat.ai" /> //TODO Update URL
<meta name="twitter:url" content="https://librechat.ai" /> //TODO Update URL
<meta name="twitter:site:domain" content="librechat.ai" />
<meta name="twitter:url" content="https://librechat.ai" />
<style
dangerouslySetInnerHTML={{
__html: `html { --font-geist-sans: ${GeistSans.style.fontFamily}; }`,
Expand Down

0 comments on commit 65c64f9

Please sign in to comment.