mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-06-28 06:34:15 +00:00
fix: build errors
This commit is contained in:
parent
59bc1d3ace
commit
d208565a61
20 changed files with 37 additions and 48 deletions
|
|
@ -22,7 +22,6 @@
|
|||
"@nanostores/react": "^1.1.0",
|
||||
"@swup/astro": "^1.8.0",
|
||||
"@tailwindcss/vite": "^4.2.2",
|
||||
"@tomodachi-share/backend": "workspace:*",
|
||||
"@tomodachi-share/shared": "workspace:*",
|
||||
"@types/react": "^19.2.14",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
import { Icon } from "@iconify/react";
|
||||
import DeleteMiiButton from "./delete-mii-button";
|
||||
import type { Mii } from "@tomodachi-share/backend";
|
||||
|
||||
interface Props {
|
||||
mii: Mii | any;
|
||||
mii: any;
|
||||
}
|
||||
|
||||
export default function AuthorButtons({ mii }: Props) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { type ChangeEvent } from "react";
|
||||
import { MiiGender } from "@tomodachi-share/backend";
|
||||
import { type SwitchMiiInstructions } from "@tomodachi-share/shared";
|
||||
import { type MiiGender, type SwitchMiiInstructions } from "@tomodachi-share/shared";
|
||||
|
||||
interface Props {
|
||||
data: SwitchMiiInstructions["datingPreferences"];
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
import { useEffect, useMemo, useState } from "react";
|
||||
import { Icon } from "@iconify/react";
|
||||
|
||||
import type { MiiGender, MiiMakeup, MiiPlatform } from "@tomodachi-share/backend";
|
||||
|
||||
import PlatformSelect from "./platform-select";
|
||||
import TagFilter from "./tag-filter";
|
||||
import GenderSelect from "./gender-select";
|
||||
import OtherFilters from "./other-filters";
|
||||
import MakeupSelect from "./makeup-select";
|
||||
import type { MiiGender, MiiMakeup, MiiPlatform } from "@tomodachi-share/shared";
|
||||
|
||||
export default function FilterMenu() {
|
||||
const searchParams = new URLSearchParams(window.location.search);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { useState, useTransition } from "react";
|
||||
import { Icon } from "@iconify/react";
|
||||
import type { MiiGender, MiiPlatform } from "@tomodachi-share/backend";
|
||||
import type { MiiGender, MiiPlatform } from "@tomodachi-share/shared";
|
||||
|
||||
export default function GenderSelect() {
|
||||
const searchParams = new URLSearchParams(window.location.search);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { useState, useTransition } from "react";
|
||||
import { Icon } from "@iconify/react";
|
||||
import { type MiiMakeup } from "@tomodachi-share/backend";
|
||||
import type { MiiMakeup } from "@tomodachi-share/shared";
|
||||
|
||||
export default function MakeupSelect() {
|
||||
const searchParams = new URLSearchParams(window.location.search);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { type MiiPlatform } from "@tomodachi-share/backend";
|
||||
import type { MiiPlatform } from "@tomodachi-share/shared";
|
||||
import { type ChangeEvent, useState, useTransition } from "react";
|
||||
|
||||
export default function OtherFilters() {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { useState, useTransition } from "react";
|
||||
import { Icon } from "@iconify/react";
|
||||
import type { MiiPlatform } from "@tomodachi-share/backend";
|
||||
import type { MiiPlatform } from "@tomodachi-share/shared";
|
||||
|
||||
export default function PlatformSelect() {
|
||||
const searchParams = new URLSearchParams(window.location.search);
|
||||
|
|
|
|||
|
|
@ -3,13 +3,12 @@ import FilterMenu from "../mii/list/filter-menu";
|
|||
import SortSelect from "../mii/list/sort-select";
|
||||
import MiiGrid from "../mii/list/mii-grid";
|
||||
import Pagination from "../pagination";
|
||||
import { type Mii } from "@tomodachi-share/backend";
|
||||
import Skeleton from "../mii/list/skeleton";
|
||||
|
||||
interface ApiResponse {
|
||||
totalCount: number;
|
||||
filteredCount: number;
|
||||
miis: Mii[];
|
||||
miis: any[];
|
||||
lastPage: number;
|
||||
}
|
||||
|
||||
|
|
@ -40,8 +39,10 @@ export default function IndexPage() {
|
|||
{searchParams.get("tags") ? `Miis tagged with '${searchParams.get("tags")}' - TomodachiShare` : "TomodachiShare - index mii list"}
|
||||
</h1>
|
||||
|
||||
<p className="text-center mb-4">We're currently going through some major code changes therefore some features won't work.</p>
|
||||
|
||||
<Suspense fallback={<Skeleton />}>
|
||||
{!loading && (
|
||||
{!loading && data ? (
|
||||
<div className="w-full">
|
||||
<div className="bg-amber-50 border-2 border-amber-500 rounded-2xl shadow-lg p-4 flex justify-between items-center gap-2 mb-2 max-md:flex-col">
|
||||
<div className="flex items-center gap-2">
|
||||
|
|
@ -69,6 +70,8 @@ export default function IndexPage() {
|
|||
<MiiGrid miis={data.miis} />
|
||||
<Pagination lastPage={data.lastPage} />
|
||||
</div>
|
||||
) : (
|
||||
<p>No Miis found :( Has the server died?</p>
|
||||
)}
|
||||
</Suspense>
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import ShareMiiButton from "../mii/share-mii-button";
|
|||
import ThreeDsScanTutorialButton from "../tutorial/3ds-scan";
|
||||
import SwitchAddMiiTutorialButton from "../tutorial/switch-add-mii";
|
||||
import MiiInstructions from "../mii/instructions";
|
||||
import type { Mii } from "@tomodachi-share/backend";
|
||||
import { Icon } from "@iconify/react";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
|
|
@ -17,7 +16,7 @@ interface Props {
|
|||
}
|
||||
|
||||
export default function MiiPage({ id }: Props) {
|
||||
const [mii, setMii] = useState<Mii | any>(null);
|
||||
const [mii, setMii] = useState<any>(null);
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -291,7 +290,7 @@ export default function MiiPage({ id }: Props) {
|
|||
|
||||
{/* Buttons */}
|
||||
<div className="flex gap-3 w-fit bg-amber-50 border-2 border-amber-500 rounded-2xl shadow-lg p-4 text-3xl text-orange-400 max-md:place-self-center *:size-12 *:flex *:flex-col *:items-center *:gap-1 **:transition-discrete **:duration-150 *:hover:brightness-75 *:hover:scale-[1.08] *:[&_span]:text-xs">
|
||||
<AuthorButtons mii={mii} />
|
||||
{/* <AuthorButtons mii={mii} /> */}
|
||||
|
||||
<ShareMiiButton miiId={mii.id} />
|
||||
<a aria-label="Report Mii" href={`${import.meta.env.PUBLIC_API_URL}/report/mii/${mii.id}`}>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import type { User } from "@tomodachi-share/backend";
|
||||
import { useEffect, useState } from "react";
|
||||
import ProfileInformation from "../profile-information";
|
||||
|
||||
|
|
@ -7,7 +6,7 @@ interface Props {
|
|||
}
|
||||
|
||||
export default function ProfilePage({ id }: Props) {
|
||||
const [user, setUser] = useState<User | any>(null);
|
||||
const [user, setUser] = useState<any>(null);
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
|||
|
|
@ -1,19 +1,18 @@
|
|||
import { Icon } from "@iconify/react";
|
||||
|
||||
import Description from "./description";
|
||||
import { type User } from "@tomodachi-share/backend";
|
||||
import { useStore } from "@nanostores/react";
|
||||
import { session } from "../session";
|
||||
|
||||
interface Props {
|
||||
user?: User | any;
|
||||
user?: any;
|
||||
page?: "settings" | "likes";
|
||||
}
|
||||
|
||||
export default function ProfileInformation({ user, page }: Props) {
|
||||
const $session = useStore(session);
|
||||
|
||||
const isAdmin = (!user ? $session.user.id : user.id) === Number(import.meta.env.PUBLIC_ADMIN_USER_ID);
|
||||
const isAdmin = (!user ? $session?.user.id : user.id) === Number(import.meta.env.PUBLIC_ADMIN_USER_ID);
|
||||
const isContributor = import.meta.env.PUBLIC_CONTRIBUTORS_USER_IDS?.split(",").includes(user.id);
|
||||
const isOwnProfile = !user || $session?.user?.id === user.id;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { type FileWithPath } from "react-dropzone";
|
|||
import { Icon } from "@iconify/react";
|
||||
|
||||
import qrcode from "qrcode-generator";
|
||||
import { MiiGender, MiiMakeup, MiiPlatform } from "@tomodachi-share/backend";
|
||||
|
||||
import { nameSchema, tagsSchema } from "@tomodachi-share/shared/schemas";
|
||||
import { defaultInstructions, type SwitchMiiInstructions, ThreeDsTomodachiLifeMii, convertQrCode } from "@tomodachi-share/shared";
|
||||
|
|
@ -21,6 +20,7 @@ import LikeButton from "../like-button";
|
|||
import Carousel from "../carousel";
|
||||
import SubmitButton from "../submit-button";
|
||||
import Dropzone from "../dropzone";
|
||||
import type { MiiPlatform, MiiGender, MiiMakeup } from "@tomodachi-share/shared";
|
||||
|
||||
export default function SubmitForm() {
|
||||
const [files, setFiles] = useState<FileWithPath[]>([]);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { useState } from "react";
|
||||
import { MiiGender } from "@tomodachi-share/backend";
|
||||
import type { SwitchMiiInstructions } from "@tomodachi-share/shared";
|
||||
import type { MiiGender, SwitchMiiInstructions } from "@tomodachi-share/shared";
|
||||
import EnhancedSlider from "../enhanced-slider";
|
||||
import DatingPreferencesViewer from "../../../mii/dating-preferences";
|
||||
import VoiceViewer from "../../../mii/voice-viewer";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue