From 6e3905eb0f7264c7b76da9f9777bac44e149b48c Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 23 Oct 2021 16:42:04 +0100 Subject: [PATCH] fix(asset): wideSVG is refusing to exist, use legacy loading mechanism --- public/assets_default/{svg => }/wide.svg | 0 .../intermediate/modals/Onboarding.tsx | 3 ++- src/pages/home/Home.tsx | 3 ++- src/pages/login/forms/Form.tsx | 3 ++- vite.config.ts | 26 +++++++------------ 5 files changed, 16 insertions(+), 19 deletions(-) rename public/assets_default/{svg => }/wide.svg (100%) diff --git a/public/assets_default/svg/wide.svg b/public/assets_default/wide.svg similarity index 100% rename from public/assets_default/svg/wide.svg rename to public/assets_default/wide.svg diff --git a/src/context/intermediate/modals/Onboarding.tsx b/src/context/intermediate/modals/Onboarding.tsx index 08b05b32..8ba29f2c 100644 --- a/src/context/intermediate/modals/Onboarding.tsx +++ b/src/context/intermediate/modals/Onboarding.tsx @@ -4,6 +4,7 @@ import styles from "./Onboarding.module.scss"; import { Text } from "preact-i18n"; import { useState } from "preact/hooks"; +import wideSVG from "../../../../public/assets/wide.svg"; import Button from "../../../components/ui/Button"; import Preloader from "../../../components/ui/Preloader"; @@ -40,7 +41,7 @@ export function OnboardingModal({ onClose, callback }: Props) {


- +

diff --git a/src/pages/home/Home.tsx b/src/pages/home/Home.tsx index 04b24455..18144a50 100644 --- a/src/pages/home/Home.tsx +++ b/src/pages/home/Home.tsx @@ -10,6 +10,7 @@ import { isTouchscreenDevice } from "../../lib/isTouchscreenDevice"; import { dispatch, getState } from "../../redux"; +import wideSVG from "../../../../public/assets/wide.svg"; import Emoji from "../../components/common/Emoji"; import Tooltip from "../../components/common/Tooltip"; import Header from "../../components/ui/Header"; @@ -66,7 +67,7 @@ export default function Home() {


- +

diff --git a/src/pages/login/forms/Form.tsx b/src/pages/login/forms/Form.tsx index 95837b63..b11dbe91 100644 --- a/src/pages/login/forms/Form.tsx +++ b/src/pages/login/forms/Form.tsx @@ -9,6 +9,7 @@ import { useContext, useState } from "preact/hooks"; import { AppContext } from "../../../context/revoltjs/RevoltClient"; import { takeError } from "../../../context/revoltjs/util"; +import wideSVG from "../../../../public/assets/wide.svg"; import Button from "../../../components/ui/Button"; import Overline from "../../../components/ui/Overline"; import Preloader from "../../../components/ui/Preloader"; @@ -145,7 +146,7 @@ export function Form({ page, callback }: Props) { return (
- + {/* Preact / React typing incompatabilities */}