Skip to content

Commit

Permalink
Merge branch 'Weaverse:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
hta218 authored Jul 30, 2024
2 parents cd0a258 + a51b8ef commit 4cf6f3a
Show file tree
Hide file tree
Showing 19 changed files with 1,228 additions and 1,169 deletions.
8 changes: 4 additions & 4 deletions app/components/Checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
import { Check } from "lucide-react";
import * as React from "react";
import { cn } from "~/lib/cn";
import { IconCheck } from "./Icons";

interface CheckboxProps
extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> {
Expand All @@ -12,7 +12,7 @@ const Checkbox = React.forwardRef<
React.ElementRef<typeof CheckboxPrimitive.Root>,
CheckboxProps
>(({ className, label, ...props }, ref) => (
<div className={cn(`flex items-center space-x-2.5`, className)}>
<div className={cn("flex items-center space-x-2.5", className)}>
<CheckboxPrimitive.Root
ref={ref}
className={cn(
Expand All @@ -23,7 +23,7 @@ const Checkbox = React.forwardRef<
<CheckboxPrimitive.Indicator
className={cn("flex items-center justify-center text-current")}
>
<Check className="h-3 w-3" />
<IconCheck className="h-3 w-3" />
</CheckboxPrimitive.Indicator>
</CheckboxPrimitive.Root>
{label ? <span>{label}</span> : null}
Expand Down
88 changes: 88 additions & 0 deletions app/components/Icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -346,3 +346,91 @@ export function IconEnvelopeSimple(props: IconProps) {
</svg>
);
}

export function IconFacebookLogo(props: IconProps) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
viewBox="0 0 256 256"
fill="currentColor"
{...props}
>
<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm8,191.63V152h24a8,8,0,0,0,0-16H136V112a16,16,0,0,1,16-16h16a8,8,0,0,0,0-16H152a32,32,0,0,0-32,32v24H96a8,8,0,0,0,0,16h24v63.63a88,88,0,1,1,16,0Z" />
</svg>
);
}
export function IconInstagramLogo(props: IconProps) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
viewBox="0 0 256 256"
fill="currentColor"
{...props}
>
<path d="M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160ZM176,24H80A56.06,56.06,0,0,0,24,80v96a56.06,56.06,0,0,0,56,56h96a56.06,56.06,0,0,0,56-56V80A56.06,56.06,0,0,0,176,24Zm40,152a40,40,0,0,1-40,40H80a40,40,0,0,1-40-40V80A40,40,0,0,1,80,40h96a40,40,0,0,1,40,40ZM192,76a12,12,0,1,1-12-12A12,12,0,0,1,192,76Z" />
</svg>
);
}
export function IconLinkedinLogo(props: IconProps) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
viewBox="0 0 256 256"
fill="currentColor"
{...props}
>
<path d="M216,24H40A16,16,0,0,0,24,40V216a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V40A16,16,0,0,0,216,24Zm0,192H40V40H216V216ZM96,112v64a8,8,0,0,1-16,0V112a8,8,0,0,1,16,0Zm88,28v36a8,8,0,0,1-16,0V140a20,20,0,0,0-40,0v36a8,8,0,0,1-16,0V112a8,8,0,0,1,15.79-1.78A36,36,0,0,1,184,140ZM100,84A12,12,0,1,1,88,72,12,12,0,0,1,100,84Z" />
</svg>
);
}

export function IconXLogo(props: IconProps) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
viewBox="0 0 256 256"
fill="currentColor"
{...props}
>
<path d="M214.75,211.71l-62.6-98.38,61.77-67.95a8,8,0,0,0-11.84-10.76L143.24,99.34,102.75,35.71A8,8,0,0,0,96,32H48a8,8,0,0,0-6.75,12.3l62.6,98.37-61.77,68a8,8,0,1,0,11.84,10.76l58.84-64.72,40.49,63.63A8,8,0,0,0,160,224h48a8,8,0,0,0,6.75-12.29ZM164.39,208,62.57,48h29L193.43,208Z" />
</svg>
);
}

export function IconGithubLogo(props: IconProps) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
viewBox="0 0 256 256"
fill="currentColor"
{...props}
>
<path d="M208.31,75.68A59.78,59.78,0,0,0,202.93,28,8,8,0,0,0,196,24a59.75,59.75,0,0,0-48,24H124A59.75,59.75,0,0,0,76,24a8,8,0,0,0-6.93,4,59.78,59.78,0,0,0-5.38,47.68A58.14,58.14,0,0,0,56,104v8a56.06,56.06,0,0,0,48.44,55.47A39.8,39.8,0,0,0,96,192v8H72a24,24,0,0,1-24-24A40,40,0,0,0,8,136a8,8,0,0,0,0,16,24,24,0,0,1,24,24,40,40,0,0,0,40,40H96v16a8,8,0,0,0,16,0V192a24,24,0,0,1,48,0v40a8,8,0,0,0,16,0V192a39.8,39.8,0,0,0-8.44-24.53A56.06,56.06,0,0,0,216,112v-8A58.14,58.14,0,0,0,208.31,75.68ZM200,112a40,40,0,0,1-40,40H112a40,40,0,0,1-40-40v-8a41.74,41.74,0,0,1,6.9-22.48A8,8,0,0,0,80,73.83a43.81,43.81,0,0,1,.79-33.58,43.88,43.88,0,0,1,32.32,20.06A8,8,0,0,0,119.82,64h32.35a8,8,0,0,0,6.74-3.69,43.87,43.87,0,0,1,32.32-20.06A43.81,43.81,0,0,1,192,73.83a8.09,8.09,0,0,0,1,7.65A41.72,41.72,0,0,1,200,104Z" />
</svg>
);
}

export function IconCheck(props: IconProps) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
viewBox="0 0 256 256"
fill="currentColor"
{...props}
>
<path d="M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z" />
</svg>
);
}
29 changes: 0 additions & 29 deletions app/data/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,32 +439,3 @@ export let VARIANTS_QUERY = `#graphql
}
${PRODUCT_VARIANT_FRAGMENT}
` as const;

export const METAOBJECTS_QUERY = `#graphql
query MetaObjects ($type: String!, $first: Int)
{
metaobjects(type: $type, first: $first) {
nodes {
fields {
key
type
value
reference {
... on MediaImage {
alt
image {
altText
url
width
height
}
}
}
}
handle
id
type
}
}
}
`;
20 changes: 20 additions & 0 deletions app/lib/locale.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { Locale } from "./type";

export function getCountryUrlPath({
countryLocale,
defaultLocalePrefix,
pathWithoutLocale,
}: {
countryLocale: Locale;
pathWithoutLocale: string;
defaultLocalePrefix: string;
}) {
let countryPrefixPath = "";
const countryLocalePrefix = `${countryLocale.language}-${countryLocale.country}`;

if (countryLocalePrefix !== defaultLocalePrefix) {
countryPrefixPath = `/${countryLocalePrefix.toLowerCase()}`;
}
return `${countryPrefixPath}${pathWithoutLocale}`;
}

Loading

0 comments on commit 4cf6f3a

Please sign in to comment.