Skip to content

Commit

Permalink
Merge pull request #184 from Vandivier/179-deprecate-store
Browse files Browse the repository at this point in the history
feat: rm store
  • Loading branch information
Vandivier authored Feb 19, 2024
2 parents 55dabbc + 74a5fb9 commit cd7b906
Show file tree
Hide file tree
Showing 16 changed files with 23 additions and 393 deletions.
100 changes: 0 additions & 100 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"nextjs-google-analytics": "2.3.3",
"postcss": "8.4.24",
"postmark": "4.0.2",
"printful-request": "2.0.0",
"prisma": "4.6.1",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand Down
5 changes: 0 additions & 5 deletions public/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,4 @@
https://ladderly.io/privacy-policy
</loc>
</url>
<url>
<loc>
https://ladderly.io/store/
</loc>
</url>
</urlset>
2 changes: 1 addition & 1 deletion src/checklist-items/mutations/createChecklistItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { CreateChecklistItemSchema } from "../schemas"

export default resolver.pipe(
resolver.zod(CreateChecklistItemSchema),
resolver.authorize(),
resolver.authorize(["ADMIN"]),
async (input) => {
const checklistItem = await db.checklistItem.create({ data: input })

Expand Down
2 changes: 1 addition & 1 deletion src/checklist-items/mutations/deleteChecklistItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { DeleteChecklistItemSchema } from "../schemas"

export default resolver.pipe(
resolver.zod(DeleteChecklistItemSchema),
resolver.authorize(),
resolver.authorize(["ADMIN"]),
async ({ id }) => {
// TODO: in multi-tenant app, you must add validation to ensure correct tenant
const checklistItem = await db.checklistItem.deleteMany({ where: { id } })
Expand Down
2 changes: 1 addition & 1 deletion src/checklist-items/mutations/updateChecklistItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { UpdateChecklistItemSchema } from "../schemas"

export default resolver.pipe(
resolver.zod(UpdateChecklistItemSchema),
resolver.authorize(),
resolver.authorize(["ADMIN"]),
async ({ id, ...data }) => {
const checklistItem = await db.checklistItem.update({
where: { id },
Expand Down
2 changes: 1 addition & 1 deletion src/checklists/mutations/createChecklist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { CreateChecklistSchema } from "../schemas"

export default resolver.pipe(
resolver.zod(CreateChecklistSchema),
resolver.authorize(),
resolver.authorize(["ADMIN"]),
async (input) => {
const checklist = await db.checklist.create({ data: input })

Expand Down
2 changes: 1 addition & 1 deletion src/checklists/mutations/deleteChecklist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { DeleteChecklistSchema } from "../schemas"

export default resolver.pipe(
resolver.zod(DeleteChecklistSchema),
resolver.authorize(),
resolver.authorize(["ADMIN"]),
async ({ id }) => {
// TODO: in multi-tenant app, you must add validation to ensure correct tenant
const checklist = await db.checklist.deleteMany({ where: { id } })
Expand Down
2 changes: 1 addition & 1 deletion src/checklists/mutations/updateChecklist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { UpdateChecklistSchema } from "../schemas"

export default resolver.pipe(
resolver.zod(UpdateChecklistSchema),
resolver.authorize(),
resolver.authorize(["ADMIN"]),
async ({ id, ...data }) => {
// TODO: in multi-tenant app, you must add validation to ensure correct tenant
const checklist = await db.checklist.update({ where: { id }, data })
Expand Down
27 changes: 17 additions & 10 deletions src/core/components/page-wrapper/TopNavRight.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import React from "react"
import { useCurrentUser } from "src/users/hooks/useCurrentUser"
import { IconVerticalChevron } from "../icons/VerticalChevron"
import { MenuContext } from "./MenuProvider"
import { AccountMenuItems, CommunityMenuItems, TOP_NAV_STANDARD_CLASSES } from "./TopNavSubmenu"
import {
AccountMenuItems,
CommunityMenuItems,
TOP_NAV_STANDARD_CLASSES,
} from "./TopNavSubmenu"

const TOP_NAV_RIGHT_SECTION_CLASSES = "ml-auto flex items-center space-x-6"

Expand Down Expand Up @@ -35,18 +39,21 @@ export const TopNavRight = () => {

return (
<div className={TOP_NAV_RIGHT_SECTION_CLASSES}>
<Link href={Routes.StorePage()} className={TOP_NAV_STANDARD_CLASSES}>
Store
</Link>
<Link href={Routes.BlogIndex()} className={TOP_NAV_STANDARD_CLASSES}>
Blog
</Link>
<button onClick={handleCommunityClick} className={TOP_NAV_STANDARD_CLASSES}>
<button
onClick={handleCommunityClick}
className={TOP_NAV_STANDARD_CLASSES}
>
Community
<IconVerticalChevron isPointingUp={openMenuName === "community"} />
</button>
{currentUser ? (
<button onClick={handleAccountClick} className={TOP_NAV_STANDARD_CLASSES}>
<button
onClick={handleAccountClick}
className={TOP_NAV_STANDARD_CLASSES}
>
Account
<IconVerticalChevron isPointingUp={openMenuName === "account"} />
</button>
Expand All @@ -55,7 +62,10 @@ export const TopNavRight = () => {
<Link className={TOP_NAV_STANDARD_CLASSES} href={Routes.LoginPage()}>
Log In
</Link>
<Link className={TOP_NAV_STANDARD_CLASSES} href={Routes.CreateAccountPage()}>
<Link
className={TOP_NAV_STANDARD_CLASSES}
href={Routes.CreateAccountPage()}
>
Create Account
</Link>
</>
Expand All @@ -66,9 +76,6 @@ export const TopNavRight = () => {

export const TopNavRightSkeleton = () => (
<div className={TOP_NAV_RIGHT_SECTION_CLASSES}>
<Link href={Routes.StorePage()} className={TOP_NAV_STANDARD_CLASSES}>
Store
</Link>
<Link href={Routes.BlogIndex()} className={TOP_NAV_STANDARD_CLASSES}>
Blog
</Link>
Expand Down
47 changes: 0 additions & 47 deletions src/pages/store/index.tsx

This file was deleted.

81 changes: 0 additions & 81 deletions src/store/components/Product.tsx

This file was deleted.

Loading

0 comments on commit cd7b906

Please sign in to comment.