Skip to content

Commit

Permalink
rename to www
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotBraem committed Oct 31, 2024
1 parent 7adde29 commit bf8e399
Show file tree
Hide file tree
Showing 89 changed files with 2,820 additions and 24 deletions.
File renamed without changes.
File renamed without changes.
Binary file added apps/www/dist.car
Binary file not shown.
File renamed without changes.
6 changes: 5 additions & 1 deletion apps/main/package.json → apps/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"build": "tsc --noCheck && vite build",
"lint": "eslint .",
"preview": "vite preview",
"nearfs:publish-library:create:car": "ipfs-car pack dist/ --output dist.car",
"nearfs:publish-library:upload:car": "node ./node_modules/nearfs/scripts/upload-car.js dist.car",
"web4:start:mainnet": "IPFS_GATEWAY_URL=https://ipfs.near.social NODE_ENV=mainnet WEB4_KEY_FILE=./_wildcard.near.page-key.pem WEB4_CERT_FILE=./_wildcard.near.page.pem npx web4-near",
"web4:start:testnet": "IPFS_GATEWAY_URL=https://ipfs.near.social NODE_ENV=testnet WEB4_KEY_FILE=./_wildcard.near.page-key.pem WEB4_CERT_FILE=./_wildcard.near.page.pem npx web4-near",
"fmt": "prettier --write '**/*.{js,jsx,ts,tsx,json}'",
Expand Down Expand Up @@ -97,6 +99,8 @@
"prettier-plugin-tailwindcss": "^0.6.8",
"tailwindcss": "^3.4.13",
"vite": "^5.4.8",
"vite-plugin-node-polyfills": "^0.22.0"
"vite-plugin-node-polyfills": "^0.22.0",
"ipfs-car": "^1.2.0",
"nearfs": "github:vgrichina/nearfs#main"
}
}
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ export const AIProcessor: React.FC<{ schema: any; onCreate: any }> = ({
<Button
className="w-full"
onClick={(type) => {
console.log("calling on submit with type", type);
console.log("and data", streamedResponse);
onCreate(streamedResponse);
}}
disabled={isProcessing || !streamedResponse}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,23 @@ import {
SelectValue
} from "@/components/ui/select";
import { useGetTypes } from "@/lib/graph";
import { WidgetProps } from "@rjsf/utils";
import { ErrorSchema, WidgetProps } from "@rjsf/utils";

export function SelectType(props: WidgetProps) {
export function SelectTypeWidget(props: WidgetProps) {
return <SelectType value={props.value} onChange={props.onChange} />;
}

export function SelectType({
value,
onChange
}: {
value: string;
onChange: (
value: any,
es?: ErrorSchema<any> | undefined,
id?: string | undefined
) => void;
}) {
const { data: types, isLoading, isError } = useGetTypes();

if (isLoading) {
Expand All @@ -19,7 +33,7 @@ export function SelectType(props: WidgetProps) {
return <p>Failed to load types</p>;
}
return (
<Select onValueChange={props.onChange} defaultValue={props.value}>
<Select onValueChange={onChange} defaultValue={value}>
<SelectTrigger className="w-full">
<SelectValue placeholder="Select a type" />
</SelectTrigger>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ export const getThings = (me: UserAccount) => {
);
};

export const getTypes = (me: UserAccount) => {
me.root?.inventories?.flatMap(
(inventory) =>
inventory?.things?.filter(
(thing): thing is Exclude<typeof thing, null> => thing
) || []
) || []
}

export const getThing = (thingId: ID<Thing>) => {
return useCoState(Thing, thingId);
};
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit bf8e399

Please sign in to comment.