mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-05-13 13:17:45 +00:00
fix: build errors
This commit is contained in:
parent
63dbaf13fa
commit
59d2b0b2c1
2 changed files with 7 additions and 5 deletions
|
|
@ -1,16 +1,18 @@
|
||||||
import { Icon } from "@iconify/react";
|
import { Icon } from "@iconify/react";
|
||||||
import DeleteMiiButton from "./delete-mii-button";
|
import DeleteMiiButton from "./delete-mii-button";
|
||||||
import { Link } from "react-router";
|
import { Link } from "react-router";
|
||||||
|
import { useStore } from "@nanostores/react";
|
||||||
|
import { session } from "../../session";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
mii: any;
|
mii: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function AuthorButtons({ mii }: Props) {
|
export default function AuthorButtons({ mii }: Props) {
|
||||||
// const session = useSession();
|
const $session = useStore(session);
|
||||||
|
if ($session === undefined) return null;
|
||||||
// if (!session.data || (Number(session.data.user?.id) !== mii.userId && Number(session.data.user?.id) !== Number(import.meta.env.NEXT_PUBLIC_ADMIN_USER_ID)))
|
if ($session === null) return null;
|
||||||
// return null;
|
if (Number($session?.user?.id) !== mii.userId && Number($session?.user?.id) !== Number(import.meta.env.VITE_ADMIN_USER_ID)) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ export default function EditMiiPage() {
|
||||||
const [error, setError] = useState<string | undefined>(undefined);
|
const [error, setError] = useState<string | undefined>(undefined);
|
||||||
|
|
||||||
const [name, setName] = useState("");
|
const [name, setName] = useState("");
|
||||||
const [tags, setTags] = useState([]);
|
const [tags, setTags] = useState<string[]>([]);
|
||||||
const [description, setDescription] = useState("");
|
const [description, setDescription] = useState("");
|
||||||
const [gender, setGender] = useState<MiiGender>("MALE");
|
const [gender, setGender] = useState<MiiGender>("MALE");
|
||||||
const [makeup, setMakeup] = useState<MiiMakeup>("PARTIAL");
|
const [makeup, setMakeup] = useState<MiiMakeup>("PARTIAL");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue