Add following and followers pages and some layout tweaks
This commit is contained in:
parent
1e25c30cf3
commit
07df91cb5d
|
@ -155,7 +155,7 @@ export function Post({
|
|||
</div>
|
||||
<div className="flex relative flex-col gap-2 w-full">
|
||||
<div className="absolute right-0">
|
||||
<Text className="subtitle text-[12px] text-ctp-subtext1/50">
|
||||
<Text className="subtitle text-[12px] text-ctp-subtext1/25">
|
||||
{new Date(post.createdAt).toLocaleDateString("en-fi", {
|
||||
year: "numeric",
|
||||
month: "long",
|
||||
|
|
|
@ -60,19 +60,21 @@ export default function Login() {
|
|||
const error = useActionData<ActionFunction>();
|
||||
|
||||
return (
|
||||
<Card>
|
||||
<div className="flex flex-col gap-5">
|
||||
<Title>Login</Title>
|
||||
<Form className="flex flex-col gap-3" method="POST">
|
||||
<FormLabel>
|
||||
<Text>Username</Text> <FormInput type="text" name="username" />{" "}
|
||||
<Text type="error">{error ? error : ""}</Text>
|
||||
</FormLabel>
|
||||
<FormLabel>
|
||||
<Text>Password</Text> <FormInput type="password" name="password" />{" "}
|
||||
<Text type="error">{error ? error : ""}</Text>
|
||||
</FormLabel>
|
||||
<Button type="submit">Login</Button>
|
||||
</Form>
|
||||
</Card>
|
||||
<Card>
|
||||
<Form className="flex flex-col gap-3" method="POST">
|
||||
<FormLabel>
|
||||
<Text>Username</Text> <FormInput type="text" name="username" />{" "}
|
||||
<Text type="error">{error ? error : ""}</Text>
|
||||
</FormLabel>
|
||||
<FormLabel>
|
||||
<Text>Password</Text> <FormInput type="password" name="password" />{" "}
|
||||
<Text type="error">{error ? error : ""}</Text>
|
||||
</FormLabel>
|
||||
<Button type="submit">Login</Button>
|
||||
</Form>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -190,10 +190,7 @@ export default function PostRoute() {
|
|||
</Form>
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
<Title>Twitter clone</Title>
|
||||
<SubTitle>Made with Remix</SubTitle>
|
||||
</>
|
||||
""
|
||||
)}
|
||||
{data.replies.map((reply) => (
|
||||
<div key={reply.id}>
|
||||
|
|
|
@ -61,24 +61,28 @@ export default function Register() {
|
|||
const errors = useActionData<ActionFunction>();
|
||||
|
||||
return (
|
||||
<Card>
|
||||
<div className="flex flex-col gap-5">
|
||||
<Title>Register</Title>
|
||||
<Form className="flex flex-col gap-3" method="POST">
|
||||
<FormLabel>
|
||||
<Text>Username</Text> <FormInput type="text" name="username" />{" "}
|
||||
<Text type="error">{errors?.username ? errors.username : ""}</Text>
|
||||
</FormLabel>
|
||||
<FormLabel>
|
||||
<Text>Password</Text> <FormInput type="password" name="password" />{" "}
|
||||
<Text type="error">{errors?.password ? errors.password : ""}</Text>
|
||||
</FormLabel>
|
||||
<FormLabel>
|
||||
<Text>Repeat password</Text>{" "}
|
||||
<FormInput type="password" name="rpassword" />{" "}
|
||||
<Text type="error">{errors?.rpassword ? errors.rpassword : ""}</Text>
|
||||
</FormLabel>
|
||||
<Button type="submit">Register</Button>
|
||||
</Form>
|
||||
</Card>
|
||||
<Card>
|
||||
<Form className="flex flex-col gap-3" method="POST">
|
||||
<FormLabel>
|
||||
<Text>Username</Text> <FormInput type="text" name="username" />{" "}
|
||||
<Text type="error">{errors?.username ? errors.username : ""}</Text>
|
||||
</FormLabel>
|
||||
<FormLabel>
|
||||
<Text>Password</Text> <FormInput type="password" name="password" />{" "}
|
||||
<Text type="error">{errors?.password ? errors.password : ""}</Text>
|
||||
</FormLabel>
|
||||
<FormLabel>
|
||||
<Text>Repeat password</Text>{" "}
|
||||
<FormInput type="password" name="rpassword" />{" "}
|
||||
<Text type="error">
|
||||
{errors?.rpassword ? errors.rpassword : ""}
|
||||
</Text>
|
||||
</FormLabel>
|
||||
<Button type="submit">Register</Button>
|
||||
</Form>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/** @type {import('@remix-run/dev').AppConfig} */
|
||||
export default {
|
||||
ignoredRouteFiles: ["**/.*"],
|
||||
browserNodeBuiltinsPolyfill: { modules: { crypto: true } },
|
||||
// appDirectory: "app",
|
||||
// assetsBuildDirectory: "public/build",
|
||||
// publicPath: "/build/",
|
||||
|
|
Loading…
Reference in New Issue