robert_
robert_
SSolidJS
Created by robert_ on 10/14/2023 in #support
Provider context isn't being executed on SSR website before child component?
hmmmm
20 replies
SSolidJS
Created by robert_ on 10/14/2023 in #support
Provider context isn't being executed on SSR website before child component?
I think I'll pass on passing it as props
20 replies
SSolidJS
Created by robert_ on 10/14/2023 in #support
Provider context isn't being executed on SSR website before child component?
but if that's where this design style takes me
20 replies
SSolidJS
Created by robert_ on 10/14/2023 in #support
Provider context isn't being executed on SSR website before child component?
just a different style, I'm still figuring out what I want my design patterns to be here
20 replies
SSolidJS
Created by robert_ on 10/14/2023 in #support
Provider context isn't being executed on SSR website before child component?
because I'm not forwarding my props to the component
20 replies
SSolidJS
Created by robert_ on 10/14/2023 in #support
Provider context isn't being executed on SSR website before child component?
I don't think that's going to work log-term though
20 replies
SSolidJS
Created by robert_ on 10/14/2023 in #support
Provider context isn't being executed on SSR website before child component?
that's what ended up fixing it
20 replies
SSolidJS
Created by robert_ on 10/14/2023 in #support
Provider context isn't being executed on SSR website before child component?
Welcome.layout = (page: PageProps) => {
const Child = (...params: Array<any>) => page.children;

return (
<ErrorBoundary fallback={ error => <ErrorPage error={error} />}>
<Layout page={<Child {...page.props} />} />
</ErrorBoundary>
);
};
Welcome.layout = (page: PageProps) => {
const Child = (...params: Array<any>) => page.children;

return (
<ErrorBoundary fallback={ error => <ErrorPage error={error} />}>
<Layout page={<Child {...page.props} />} />
</ErrorBoundary>
);
};
20 replies
SSolidJS
Created by robert_ on 10/14/2023 in #support
Provider context isn't being executed on SSR website before child component?
my Layout was wonky
20 replies
SSolidJS
Created by robert_ on 10/14/2023 in #support
Provider context isn't being executed on SSR website before child component?
I think I got it
20 replies
SSolidJS
Created by robert_ on 10/14/2023 in #support
Provider context isn't being executed on SSR website before child component?
import { createContext, useContext } from 'solid-js';
import type { JSX, ParentProps, Context } from 'solid-js';

export type DIALOGS = { NEWMEMBER: 1, RXPRICING: 2, FINDMYRX: 3, ACTION2: 4, ACTION3: 5 };
export const Dialogs: DIALOGS = { NEWMEMBER: 1, RXPRICING: 2, FINDMYRX: 3, ACTION2: 4, ACTION3: 5 };

export type DialogType = DIALOGS[keyof DIALOGS] | string;
type DialogStateFn = (dialog: DialogType, visible?: boolean) => void;

type TChildFunc = (state: DialogStateFn) => JSX.Element;
let Dialog: Context<DialogStateFn> | undefined = undefined;

export default function Context (props: ParentProps<{ callback: DialogStateFn }>) {
if (Dialog === undefined) {
Dialog = createContext<DialogStateFn>(props.callback);
console.log("Initializing?");
}

return (
<Dialog.Provider value={props.callback}>
{props.children}
</Dialog.Provider>
);
};

export function useDialogCtx() {
if (Dialog === undefined) {
throw new Error("'Dialog' context provider not yet initialized.");
}
else return useContext(Dialog);
}

export const withDialogProvider = (callback: TChildFunc) => callback(useDialogCtx());
import { createContext, useContext } from 'solid-js';
import type { JSX, ParentProps, Context } from 'solid-js';

export type DIALOGS = { NEWMEMBER: 1, RXPRICING: 2, FINDMYRX: 3, ACTION2: 4, ACTION3: 5 };
export const Dialogs: DIALOGS = { NEWMEMBER: 1, RXPRICING: 2, FINDMYRX: 3, ACTION2: 4, ACTION3: 5 };

export type DialogType = DIALOGS[keyof DIALOGS] | string;
type DialogStateFn = (dialog: DialogType, visible?: boolean) => void;

type TChildFunc = (state: DialogStateFn) => JSX.Element;
let Dialog: Context<DialogStateFn> | undefined = undefined;

export default function Context (props: ParentProps<{ callback: DialogStateFn }>) {
if (Dialog === undefined) {
Dialog = createContext<DialogStateFn>(props.callback);
console.log("Initializing?");
}

return (
<Dialog.Provider value={props.callback}>
{props.children}
</Dialog.Provider>
);
};

export function useDialogCtx() {
if (Dialog === undefined) {
throw new Error("'Dialog' context provider not yet initialized.");
}
else return useContext(Dialog);
}

export const withDialogProvider = (callback: TChildFunc) => callback(useDialogCtx());
this still isn't working
20 replies
SSolidJS
Created by robert_ on 10/14/2023 in #support
Provider context isn't being executed on SSR website before child component?
hmm
20 replies
SSolidJS
Created by robert_ on 10/14/2023 in #support
Provider context isn't being executed on SSR website before child component?
ooooh
20 replies
SSolidJS
Created by robert_ on 10/10/2023 in #support
SVG interface for typescript?
> curl https://discord.com/api/modules/stable/versions.json
{"message": "internal network error", "code": 40333}
> curl https://discord.com/api/modules/stable/versions.json
{"message": "internal network error", "code": 40333}
lol
42 replies
SSolidJS
Created by robert_ on 10/10/2023 in #support
SVG interface for typescript?
yeah
42 replies
SSolidJS
Created by robert_ on 10/10/2023 in #support
SVG interface for typescript?
weird
42 replies
SSolidJS
Created by robert_ on 10/10/2023 in #support
SVG interface for typescript?
nor will the main UI for #support
42 replies
SSolidJS
Created by robert_ on 10/10/2023 in #support
SVG interface for typescript?
like #general won't load at all
42 replies
SSolidJS
Created by robert_ on 10/10/2023 in #support
SVG interface for typescript?
also, is it just me or is the server having issues? lol
42 replies
SSolidJS
Created by robert_ on 10/10/2023 in #support
SVG interface for typescript?
ahh
42 replies