mirror of
https://github.com/stonith404/pingvin-share.git
synced 2024-11-04 23:10:13 +01:00
Add page title
This commit is contained in:
parent
22bca7692e
commit
5845659bab
11
src/components/Meta.tsx
Normal file
11
src/components/Meta.tsx
Normal file
@ -0,0 +1,11 @@
|
||||
import Head from "next/head";
|
||||
|
||||
const Meta = ({ title }: { title: string }) => {
|
||||
return (
|
||||
<Head>
|
||||
<title>{title} - Pingvin Share</title>
|
||||
</Head>
|
||||
);
|
||||
};
|
||||
|
||||
export default Meta;
|
@ -1,6 +1,7 @@
|
||||
import { useRouter } from "next/router";
|
||||
import React, { useContext } from "react";
|
||||
import AuthForm from "../../components/auth/AuthForm";
|
||||
import Meta from "../../components/Meta";
|
||||
import { IsSignedInContext } from "../../utils/auth.util";
|
||||
|
||||
const SignIn = () => {
|
||||
@ -9,7 +10,12 @@ const SignIn = () => {
|
||||
if (isSignedIn) {
|
||||
router.replace("/");
|
||||
} else {
|
||||
return <AuthForm mode="signIn" />;
|
||||
return (
|
||||
<>
|
||||
<Meta title="Sign In" />
|
||||
<AuthForm mode="signIn" />
|
||||
</>
|
||||
);
|
||||
}
|
||||
};
|
||||
export default SignIn;
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { useRouter } from "next/router";
|
||||
import React, { useContext } from "react";
|
||||
import AuthForm from "../../components/auth/AuthForm";
|
||||
import Meta from "../../components/Meta";
|
||||
import { IsSignedInContext } from "../../utils/auth.util";
|
||||
|
||||
const SignUp = () => {
|
||||
@ -9,7 +10,12 @@ const SignUp = () => {
|
||||
if (isSignedIn) {
|
||||
router.replace("/");
|
||||
} else {
|
||||
return <AuthForm mode="signUp" />;
|
||||
return (
|
||||
<>
|
||||
<Meta title="Sign Up" />
|
||||
<AuthForm mode="signUp" />
|
||||
</>
|
||||
);
|
||||
}
|
||||
};
|
||||
export default SignUp;
|
||||
|
@ -14,6 +14,7 @@ import React, { useContext } from "react";
|
||||
import { Check } from "tabler-icons-react";
|
||||
import { IsSignedInContext } from "../utils/auth.util";
|
||||
import Image from "next/image";
|
||||
import Meta from "../components/Meta";
|
||||
const useStyles = createStyles((theme) => ({
|
||||
inner: {
|
||||
display: "flex",
|
||||
@ -74,7 +75,8 @@ export default function Home() {
|
||||
router.replace("/upload");
|
||||
} else {
|
||||
return (
|
||||
<div>
|
||||
<>
|
||||
<Meta title="Home" />
|
||||
<Container>
|
||||
<div className={classes.inner}>
|
||||
<div className={classes.content}>
|
||||
@ -143,7 +145,7 @@ export default function Home() {
|
||||
</Group>
|
||||
</div>
|
||||
</Container>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { useModals } from "@mantine/modals";
|
||||
import { useRouter } from "next/router";
|
||||
import { useEffect, useState } from "react";
|
||||
import Meta from "../../components/Meta";
|
||||
import FileList from "../../components/share/FileList";
|
||||
import showEnterPasswordModal from "../../components/share/showEnterPasswordModal";
|
||||
import showShareNotFoundModal from "../../components/share/showShareNotFoundModal";
|
||||
@ -41,13 +42,14 @@ const Share = () => {
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<>
|
||||
<Meta title={`Share ${shareId}`} />
|
||||
<FileList
|
||||
files={shareList}
|
||||
shareId={shareId}
|
||||
isLoading={shareList.length == 0}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -3,6 +3,7 @@ import { useModals } from "@mantine/modals";
|
||||
import { useRouter } from "next/router";
|
||||
import { useContext, useState } from "react";
|
||||
import { Link, Mail } from "tabler-icons-react";
|
||||
import Meta from "../components/Meta";
|
||||
import Dropzone from "../components/upload/Dropzone";
|
||||
import FileList from "../components/upload/FileList";
|
||||
import showCompletedUploadModal from "../components/upload/showCompletedUploadModal";
|
||||
@ -70,6 +71,7 @@ const Upload = () => {
|
||||
} else {
|
||||
return (
|
||||
<>
|
||||
<Meta title="Upload" />
|
||||
<Group position="right" mb={20}>
|
||||
<div>
|
||||
<Menu
|
||||
|
@ -1,3 +1,4 @@
|
||||
// TODO: Add user account
|
||||
const Account = () => {
|
||||
return <div></div>;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user