login logout redirects, session, remove out of scope code

This commit is contained in:
Timur Ercan
2023-01-04 14:37:33 +01:00
parent dd36e8d161
commit fe2219dcd2
6 changed files with 24 additions and 174 deletions

View File

@ -96,52 +96,6 @@ export default function Setttings() {
</div>
<div className="mt-6 flex flex-col lg:flex-row">
<div className="flex-grow space-y-6">
<div>
<label
htmlFor="username"
className="block text-sm font-medium text-gray-700"
>
Username
</label>
<div className="mt-1 flex rounded-md shadow-sm">
<span className="inline-flex items-center rounded-l-md border border-r-0 border-gray-300 bg-gray-50 px-3 text-gray-500 sm:text-sm">
workcation.com/
</span>
<input
type="text"
name="username"
id="username"
autoComplete="username"
className="block w-full min-w-0 flex-grow rounded-none rounded-r-md border-gray-300 focus:border-sky-500 focus:ring-sky-500 sm:text-sm"
defaultValue={user.handle}
/>
</div>
</div>
<div>
<label
htmlFor="about"
className="block text-sm font-medium text-gray-700"
>
About
</label>
<div className="mt-1">
<textarea
id="about"
name="about"
rows={3}
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-sky-500 focus:ring-sky-500 sm:text-sm"
defaultValue={""}
/>
</div>
<p className="mt-2 text-sm text-gray-500">
Brief description for your profile. URLs are
hyperlinked.
</p>
</div>
</div>
<div className="mt-6 flex-grow lg:mt-0 lg:ml-6 lg:flex-shrink-0 lg:flex-grow-0">
<p
className="text-sm font-medium text-gray-700"
@ -237,21 +191,6 @@ export default function Setttings() {
/>
</div>
<div className="col-span-12">
<label
htmlFor="url"
className="block text-sm font-medium text-gray-700"
>
URL
</label>
<input
type="text"
name="url"
id="url"
className="mt-1 block w-full rounded-md border border-gray-300 py-2 px-3 shadow-sm focus:border-sky-500 focus:outline-none focus:ring-sky-500 sm:text-sm"
/>
</div>
<div className="col-span-12 sm:col-span-6">
<label
htmlFor="company"
@ -317,108 +256,6 @@ export default function Setttings() {
/>
</Switch>
</Switch.Group>
<Switch.Group
as="li"
className="flex items-center justify-between py-4"
>
<div className="flex flex-col">
<Switch.Label
as="p"
className="text-sm font-medium text-gray-900"
passive
>
Make account private
</Switch.Label>
<Switch.Description className="text-sm text-gray-500">
Pharetra morbi dui mi mattis tellus sollicitudin
cursus pharetra.
</Switch.Description>
</div>
<Switch
checked={privateAccount}
onChange={setPrivateAccount}
className={classNames(
privateAccount ? "bg-teal-500" : "bg-gray-200",
"relative ml-4 inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-sky-500 focus:ring-offset-2"
)}
>
<span
aria-hidden="true"
className={classNames(
privateAccount ? "translate-x-5" : "translate-x-0",
"inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"
)}
/>
</Switch>
</Switch.Group>
<Switch.Group
as="li"
className="flex items-center justify-between py-4"
>
<div className="flex flex-col">
<Switch.Label
as="p"
className="text-sm font-medium text-gray-900"
passive
>
Allow commenting
</Switch.Label>
<Switch.Description className="text-sm text-gray-500">
Integer amet, nunc hendrerit adipiscing nam. Elementum
ame
</Switch.Description>
</div>
<Switch
checked={allowCommenting}
onChange={setAllowCommenting}
className={classNames(
allowCommenting ? "bg-teal-500" : "bg-gray-200",
"relative ml-4 inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-sky-500 focus:ring-offset-2"
)}
>
<span
aria-hidden="true"
className={classNames(
allowCommenting ? "translate-x-5" : "translate-x-0",
"inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"
)}
/>
</Switch>
</Switch.Group>
<Switch.Group
as="li"
className="flex items-center justify-between py-4"
>
<div className="flex flex-col">
<Switch.Label
as="p"
className="text-sm font-medium text-gray-900"
passive
>
Allow mentions
</Switch.Label>
<Switch.Description className="text-sm text-gray-500">
Adipiscing est venenatis enim molestie commodo eu
gravid
</Switch.Description>
</div>
<Switch
checked={allowMentions}
onChange={setAllowMentions}
className={classNames(
allowMentions ? "bg-teal-500" : "bg-gray-200",
"relative ml-4 inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-sky-500 focus:ring-offset-2"
)}
>
<span
aria-hidden="true"
className={classNames(
allowMentions ? "translate-x-5" : "translate-x-0",
"inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"
)}
/>
</Switch>
</Switch.Group>
</ul>
</div>
<div className="mt-4 flex justify-end py-4 px-4 sm:px-6">