Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/product page #1331

Closed
wants to merge 70 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
5892172
yarn + env
Sammii-HK Jul 26, 2023
72c8855
Show featured items on homepage even if there are <3
Sammii-HK Jul 26, 2023
9db7334
creating consts
Sammii-HK Jul 27, 2023
890d91e
dynamic product description comonents
Sammii-HK Jul 27, 2023
55517f9
creating dynamic sustainabilty info
Sammii-HK Jul 27, 2023
4afeb1e
target="_blank" on certificationLink
Sammii-HK Jul 27, 2023
6c96f39
quick branding
Sammii-HK Jul 27, 2023
2c3a00e
removing github source from footer
Sammii-HK Jul 27, 2023
9cea3c7
removing old prop from LogoIcon
Sammii-HK Jul 27, 2023
f0ffbad
adding target to sustainability info read more
Sammii-HK Jul 28, 2023
e8cc486
refactoring in next components
Sammii-HK Jul 28, 2023
decb61b
creating SKU generator from product.Title
Sammii-HK Jul 28, 2023
3a1d89e
completing SKU page design
Sammii-HK Jul 28, 2023
8f842f0
creating combox component
Sammii-HK Jul 31, 2023
6c01624
create new product mapper page
Sammii-HK Aug 2, 2023
940b0ac
amending type error
Sammii-HK Aug 20, 2023
ff99d73
Fix getKeyByValue
Sammii-HK Aug 20, 2023
7ef0ce1
Fix generated title
Sammii-HK Aug 20, 2023
483edf0
Move /product to /products for IG compat
Sammii-HK Aug 20, 2023
4a7aa19
stylnbgggg
Sammii-HK Aug 20, 2023
85938dc
sorting out the three item grid, to not be three items anymore 😏
Sammii-HK Aug 20, 2023
1de9ec7
styling label
Sammii-HK Aug 20, 2023
f66a8aa
metadata update and clog
Sammii-HK Sep 1, 2023
b6102a5
Update next
Sammii-HK Sep 1, 2023
caf3eb3
Switch to default caching
Sammii-HK Sep 1, 2023
95a77f1
updating favicon.ico
Sammii-HK Sep 1, 2023
f571d7f
Fix sos page
Sammii-HK Sep 13, 2023
6af6470
Implement sku check page
Sammii-HK Sep 13, 2023
cd7005a
filtering products to display only live products
Sammii-HK Sep 15, 2023
88228a8
Use long-lived refresh tokens for dropbox
Sammii-HK Sep 15, 2023
da4216f
Re-use filter for live products only
Sammii-HK Sep 15, 2023
4600686
correcting SKU 2XS
Sammii-HK Nov 11, 2023
991e604
updating index page meta data
Sammii-HK Nov 11, 2023
3a8f04e
updating `/products` to `/wardrobe`
Sammii-HK Nov 23, 2023
af3750c
amending SKU factory to include printSizeSKUs
Sammii-HK Nov 23, 2023
fa2a93f
filtering `hidden` collections
Sammii-HK Nov 23, 2023
61decb1
styling search layout w. margin
Sammii-HK Nov 23, 2023
13a1c26
footer amends
Sammii-HK Nov 23, 2023
1b387d8
brand overview details consts
Sammii-HK Nov 23, 2023
1219586
splitting getLiveProducts into wall & wardrobe
Sammii-HK Nov 23, 2023
8f8c284
wall base pages WIP
Sammii-HK Nov 23, 2023
5dd476e
getAllLiveProducts
Sammii-HK Nov 23, 2023
f4dc383
wardrobe page
Sammii-HK Nov 23, 2023
b4098b3
amending mobile burger to white text
Sammii-HK Nov 23, 2023
14fd520
getAllLiveProducts
Sammii-HK Nov 23, 2023
ad2f16f
styling base button
Sammii-HK Nov 23, 2023
13132c8
updating homepage with new categories WIP
Sammii-HK Nov 23, 2023
5a3cab9
update search to allLiveProducts
Sammii-HK Nov 23, 2023
2824ecd
amending radius size
Sammii-HK Nov 23, 2023
80490d8
Updating error message for wall oage
Sammii-HK Nov 23, 2023
3d1aa2f
creating dynamic product info page
Sammii-HK Nov 23, 2023
175b5e8
amending gallery styling
Sammii-HK Nov 23, 2023
b705573
creating responsive design
Sammii-HK Nov 23, 2023
8126a1f
removing unecessary oaesg
Sammii-HK Nov 23, 2023
abfd2ee
improving landing page
Sammii-HK Nov 23, 2023
5cfc48c
update bag button copy
Sammii-HK Nov 24, 2023
4e33afc
refactoring out variant specific details
Sammii-HK Nov 24, 2023
b349798
linting and error amends
Sammii-HK Nov 24, 2023
09e1cf2
typing
Sammii-HK Nov 24, 2023
8daeb78
swapping max to minVarPrice
Sammii-HK Nov 24, 2023
a2c34aa
google merchant meta tag
Sammii-HK Dec 16, 2023
08b3b82
Squashed commit of the following:
Sammii-HK Apr 25, 2024
61a357c
commenting out sustainability info on product page
Sammii-HK Apr 25, 2024
6a96036
updating description-content
Sammii-HK Apr 25, 2024
4642060
updating app meta data
Sammii-HK Apr 25, 2024
90494b1
creating sustainability page
Sammii-HK Apr 25, 2024
ebf99d9
amending description content
Sammii-HK Apr 25, 2024
9f02e3f
updating sustainability info
Sammii-HK Apr 25, 2024
b154bed
altering item-details
Sammii-HK Apr 25, 2024
4d787a9
sustainability info text update
Sammii-HK Apr 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts
.env*.local
61 changes: 61 additions & 0 deletions @/components/ui/accordion.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
"use client"

import * as AccordionPrimitive from "@radix-ui/react-accordion"
import { ChevronDown } from "lucide-react"
import * as React from "react"

import { cn } from "@/lib/utils"

const Accordion = AccordionPrimitive.Root

const AccordionItem = React.forwardRef<
React.ElementRef<typeof AccordionPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
>(({ className, ...props }, ref) => (
<AccordionPrimitive.Item
ref={ref}
className={cn("border-b border-neutral-600", className)}
{...props}
/>
))
AccordionItem.displayName = "AccordionItem"

const AccordionTrigger = React.forwardRef<
React.ElementRef<typeof AccordionPrimitive.Trigger>,
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
>(({ className, children, ...props }, ref) => (
<AccordionPrimitive.Header className="flex">
<AccordionPrimitive.Trigger
ref={ref}
className={cn(
"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
className
)}
{...props}
>
{children}
<ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />
</AccordionPrimitive.Trigger>
</AccordionPrimitive.Header>
))
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName

const AccordionContent = React.forwardRef<
React.ElementRef<typeof AccordionPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
>(({ className, children, ...props }, ref) => (
<AccordionPrimitive.Content
ref={ref}
className={cn(
"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
className
)}
{...props}
>
<div className="pb-4 pt-0 text-neutral-50">{children}</div>
</AccordionPrimitive.Content>
))
AccordionContent.displayName = AccordionPrimitive.Content.displayName

export { Accordion, AccordionContent, AccordionItem, AccordionTrigger }

57 changes: 57 additions & 0 deletions @/components/ui/button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import { Slot } from "@radix-ui/react-slot"
import { cva, type VariantProps } from "class-variance-authority"
import * as React from "react"

import { cn } from "@/lib/utils"

const buttonVariants = cva(
"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
{
variants: {
variant: {
default: "bg-primary text-primary-foreground hover:bg-primary/90",
dark: "bg-black text-white hover:bg-primary/90",
destructive:
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
outline:
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
secondary:
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
ghost: "hover:bg-accent hover:text-accent-foreground",
link: "text-primary underline-offset-4 hover:underline",
},
size: {
default: "h-10 px-4 py-2",
sm: "h-9 rounded-md px-3",
lg: "h-11 rounded-md px-8",
icon: "h-10 w-10",
},
},
defaultVariants: {
variant: "default",
size: "default",
},
}
)

export interface ButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
VariantProps<typeof buttonVariants> {
asChild?: boolean
}

const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant, size, asChild = false, ...props }, ref) => {
const Comp = asChild ? Slot : "button"
return (
<Comp
className={cn(buttonVariants({ variant, size, className }))}
ref={ref}
{...props}
/>
)
}
)
Button.displayName = "Button"

export { Button, buttonVariants }
155 changes: 155 additions & 0 deletions @/components/ui/command.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
"use client"

import * as React from "react"
import { DialogProps } from "@radix-ui/react-dialog"
import { Command as CommandPrimitive } from "cmdk"
import { Search } from "lucide-react"

import { cn } from "@/lib/utils"
import { Dialog, DialogContent } from "@/components/ui/dialog"

const Command = React.forwardRef<
React.ElementRef<typeof CommandPrimitive>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive>
>(({ className, ...props }, ref) => (
<CommandPrimitive
ref={ref}
className={cn(
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
className
)}
{...props}
/>
))
Command.displayName = CommandPrimitive.displayName

interface CommandDialogProps extends DialogProps {}

const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
return (
<Dialog {...props}>
<DialogContent className="overflow-hidden p-0 shadow-lg">
<Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
{children}
</Command>
</DialogContent>
</Dialog>
)
}

const CommandInput = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Input>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
>(({ className, ...props }, ref) => (
<div className="flex items-center border-b px-3" cmdk-input-wrapper="">
<Search className="mr-2 h-4 w-4 shrink-0 opacity-50" />
<CommandPrimitive.Input
ref={ref}
className={cn(
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
className
)}
{...props}
/>
</div>
))

CommandInput.displayName = CommandPrimitive.Input.displayName

const CommandList = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.List>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>
>(({ className, ...props }, ref) => (
<CommandPrimitive.List
ref={ref}
className={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)}
{...props}
/>
))

CommandList.displayName = CommandPrimitive.List.displayName

const CommandEmpty = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Empty>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>
>((props, ref) => (
<CommandPrimitive.Empty
ref={ref}
className="py-6 text-center text-sm"
{...props}
/>
))

CommandEmpty.displayName = CommandPrimitive.Empty.displayName

const CommandGroup = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Group>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>
>(({ className, ...props }, ref) => (
<CommandPrimitive.Group
ref={ref}
className={cn(
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
className
)}
{...props}
/>
))

CommandGroup.displayName = CommandPrimitive.Group.displayName

const CommandSeparator = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Separator>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>
>(({ className, ...props }, ref) => (
<CommandPrimitive.Separator
ref={ref}
className={cn("-mx-1 h-px bg-border", className)}
{...props}
/>
))
CommandSeparator.displayName = CommandPrimitive.Separator.displayName

const CommandItem = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>
>(({ className, ...props }, ref) => (
<CommandPrimitive.Item
ref={ref}
className={cn(
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className
)}
{...props}
/>
))

CommandItem.displayName = CommandPrimitive.Item.displayName

const CommandShortcut = ({
className,
...props
}: React.HTMLAttributes<HTMLSpanElement>) => {
return (
<span
className={cn(
"ml-auto text-xs tracking-widest text-muted-foreground",
className
)}
{...props}
/>
)
}
CommandShortcut.displayName = "CommandShortcut"

export {
Command,
CommandDialog,
CommandInput,
CommandList,
CommandEmpty,
CommandGroup,
CommandItem,
CommandShortcut,
CommandSeparator,
}
Loading