damon
damon
SSolidJS
Created by damon on 8/5/2023 in #support
Solid Start error
import {Accessor, Component, Setter} from "solid-js";
import {IFont, ITheme} from "~/constants";
import {TbPaint} from "solid-icons/tb";
import {BsGear, BsPencil} from "solid-icons/bs";

interface SettingsProps {
themes: ITheme[];
fonts: IFont[];
theme: Accessor<string>;
setTheme: Setter<string>
onButtonClick: () => void;
font: Accessor<string>;
setFont: Setter<string>;
settingsOpen: Accessor<boolean>;
}

const Settings: Component<SettingsProps> = (props) => {

return (
<div class="relative">
<button
class="p-2 rounded-md hover:bg-gray-200 dark:hover:bg-gray-800 focus:outline-none"
onClick={() => props.onButtonClick()}
>
<BsGear class="w-6 h-6"/>
</button>
<div
class={`absolute right-0 mt-2 fade-in py-2 w-48 bg-white dark:bg-gray-800 anim rounded-md shadow-lg ${
props.settingsOpen() ? "block" : "hidden"
}`}
>
<div class="px-4 py-2">
<label class="block text-sm font-medium text-gray-700 dark:text-gray-200">
<TbPaint class="inline-block w-6 h-6 mr-2"/> Theme
</label>
<select
value={props.theme()}
onChange={(e) => {
props.setTheme(e.target.value)
props.onButtonClick()
}}
class="mt-1 block w-full py-2 px-3 border border-gray-300 bg-white dark:bg-gray-800 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"
>

{props.themes.map((themeOption) => (
<option value={themeOption.name}>{themeOption.displayName}</option>
))}
</select>
</div>
<div class="px-4 py-2">
<label class="block text-sm font-medium text-gray-700 dark:text-gray-200">
<BsPencil class="inline-block w-6 h-6 mr-2"/> Font
</label>
<select
value={props.font()}
onChange={(e) => {
props.setFont(e.target.value)
props.onButtonClick()
}}
class="mt-1 block w-full py-2 px-3 border border-gray-300 bg-white dark:bg-gray-800 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"
>
{props.fonts.map((fontOption) => (
<option value={fontOption.name}>{fontOption.displayName}</option>
))}
</select>
</div>
</div>
</div>
);
};

export default Settings;
import {Accessor, Component, Setter} from "solid-js";
import {IFont, ITheme} from "~/constants";
import {TbPaint} from "solid-icons/tb";
import {BsGear, BsPencil} from "solid-icons/bs";

interface SettingsProps {
themes: ITheme[];
fonts: IFont[];
theme: Accessor<string>;
setTheme: Setter<string>
onButtonClick: () => void;
font: Accessor<string>;
setFont: Setter<string>;
settingsOpen: Accessor<boolean>;
}

const Settings: Component<SettingsProps> = (props) => {

return (
<div class="relative">
<button
class="p-2 rounded-md hover:bg-gray-200 dark:hover:bg-gray-800 focus:outline-none"
onClick={() => props.onButtonClick()}
>
<BsGear class="w-6 h-6"/>
</button>
<div
class={`absolute right-0 mt-2 fade-in py-2 w-48 bg-white dark:bg-gray-800 anim rounded-md shadow-lg ${
props.settingsOpen() ? "block" : "hidden"
}`}
>
<div class="px-4 py-2">
<label class="block text-sm font-medium text-gray-700 dark:text-gray-200">
<TbPaint class="inline-block w-6 h-6 mr-2"/> Theme
</label>
<select
value={props.theme()}
onChange={(e) => {
props.setTheme(e.target.value)
props.onButtonClick()
}}
class="mt-1 block w-full py-2 px-3 border border-gray-300 bg-white dark:bg-gray-800 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"
>

{props.themes.map((themeOption) => (
<option value={themeOption.name}>{themeOption.displayName}</option>
))}
</select>
</div>
<div class="px-4 py-2">
<label class="block text-sm font-medium text-gray-700 dark:text-gray-200">
<BsPencil class="inline-block w-6 h-6 mr-2"/> Font
</label>
<select
value={props.font()}
onChange={(e) => {
props.setFont(e.target.value)
props.onButtonClick()
}}
class="mt-1 block w-full py-2 px-3 border border-gray-300 bg-white dark:bg-gray-800 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"
>
{props.fonts.map((fontOption) => (
<option value={fontOption.name}>{fontOption.displayName}</option>
))}
</select>
</div>
</div>
</div>
);
};

export default Settings;
it was something in this component that was causing the bug
152 replies
SSolidJS
Created by damon on 8/5/2023 in #support
Solid Start error
is tehre anyway i can do some debugging on the deployed verison?
152 replies
SSolidJS
Created by damon on 8/5/2023 in #support
Solid Start error
not deployed
152 replies
SSolidJS
Created by damon on 8/5/2023 in #support
Solid Start error
well it works locally perfectly
152 replies
SSolidJS
Created by damon on 8/5/2023 in #support
Solid Start error
152 replies
SSolidJS
Created by damon on 8/5/2023 in #support
Solid Start error
do I need to use a provider or can i put this in a root component?
152 replies
SSolidJS
Created by damon on 8/5/2023 in #support
Solid Start error
yeah so ihave been having trouble with this so is the issue with dark mode with ssr the server has one value and the client has another?
152 replies
SSolidJS
Created by damon on 8/5/2023 in #support
Solid Start error
and it should theoritically work]
152 replies
SSolidJS
Created by damon on 8/5/2023 in #support
Solid Start error
and add it to my root component
152 replies
SSolidJS
Created by damon on 8/5/2023 in #support
Solid Start error
so i can c + p this context
152 replies
SSolidJS
Created by damon on 8/5/2023 in #support
Solid Start error
okay, ill try to remove that doesnt solid have built in cookie stuff?
152 replies
SSolidJS
Created by damon on 8/5/2023 in #support
Solid Start error
just trying to figure out
152 replies
SSolidJS
Created by damon on 8/5/2023 in #support
Solid Start error
Im nto saying its not i dont know how that came off
152 replies
SSolidJS
Created by damon on 8/5/2023 in #support
Solid Start error
im just confused if its running in docker how this could be the issue
152 replies
SSolidJS
Created by damon on 8/5/2023 in #support
Solid Start error
152 replies
SSolidJS
Created by damon on 8/5/2023 in #support
Solid Start error
yep lol
152 replies
SSolidJS
Created by damon on 8/5/2023 in #support
Solid Start error
Another error I ran into https://dev.damon.systems/ literally on the hompage... idk if im just posionous to the library
152 replies
SSolidJS
Created by damon on 8/5/2023 in #support
Solid Start error
contabo vps running arch
152 replies
SSolidJS
Created by damon on 8/5/2023 in #support
Solid Start error
i really appreciate it
152 replies
SSolidJS
Created by damon on 8/5/2023 in #support
Solid Start error
you fixed my problems tommy
152 replies