-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into Vxrcel-clean
- Loading branch information
Showing
5 changed files
with
128 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/app/dashboard/(admin)/admin/email/edit-in-buit-templates/_components/SideEditNav.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { ArrowDown, ArrowUp, Copy, Delete, Plus } from "lucide-react"; | ||
import React from "react"; | ||
|
||
const SideEditNav: React.FC = () => { | ||
return ( | ||
<nav className="flex-1 space-y-1"> | ||
<button className="flex items-center rounded-md border border-slate-100 p-3 text-left hover:bg-gray-200"> | ||
<ArrowUp className="h-3 w-3" /> | ||
</button> | ||
<button className="flex items-center rounded-md border border-slate-100 p-3 text-left hover:bg-gray-200"> | ||
<ArrowDown className="h-3 w-3" /> | ||
</button> | ||
<button className="flex items-center rounded-md border border-slate-100 p-3 text-left hover:bg-gray-200"> | ||
<Copy className="h-3 w-3" /> | ||
</button> | ||
<button className="flex items-center rounded-md border border-slate-100 p-3 text-left hover:bg-gray-200"> | ||
<Delete className="h-3 w-3" /> | ||
</button> | ||
<button className="flex items-center rounded-md border border-slate-100 p-3 text-left hover:bg-gray-200"> | ||
<Plus className="h-3 w-3" /> | ||
</button> | ||
</nav> | ||
); | ||
}; | ||
|
||
export default SideEditNav; |
102 changes: 99 additions & 3 deletions
102
src/app/dashboard/(user-dashboard)/settings/data-and-privacy/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,101 @@ | ||
const page = () => { | ||
return <div>page</div>; | ||
"use client"; | ||
|
||
import { useState } from "react"; | ||
|
||
interface ToggleSwitchProperties { | ||
label: string; | ||
description: string; | ||
apiEndpoint: string; | ||
} | ||
|
||
const ToggleSwitch: React.FC<ToggleSwitchProperties> = ({ | ||
label, | ||
description, | ||
}) => { | ||
const [enabled, setEnabled] = useState(false); | ||
|
||
const handleToggle = async () => { | ||
setEnabled(!enabled); | ||
}; | ||
|
||
return ( | ||
<div className="mb-4 rounded-md border p-6 shadow"> | ||
<div className="mb-2 flex items-center justify-between"> | ||
<label className="text-2xl text-lg font-semibold">{label}</label> | ||
<label className="relative inline-block h-8 w-14"> | ||
<input | ||
type="checkbox" | ||
checked={enabled} | ||
onChange={handleToggle} | ||
className="h-0 w-0 opacity-0" | ||
/> | ||
<span | ||
className={`absolute bottom-0 left-0 right-0 top-0 cursor-pointer rounded-full transition duration-300 ${ | ||
enabled ? "bg-primary" : "bg-subtle" | ||
}`} | ||
/> | ||
<span | ||
className={`absolute transform rounded-full bg-white transition duration-300 ${ | ||
enabled ? "translate-x-6" : "translate-x-0" | ||
} left-1 top-1 h-6 w-6`} | ||
/> | ||
</label> | ||
</div> | ||
<p className="text-sm text-foreground">{description}</p> | ||
</div> | ||
); | ||
}; | ||
|
||
const Page = () => { | ||
return ( | ||
<div className="p-6"> | ||
<h1 className="mb-10 text-[28px] font-bold">Data & Privacy</h1> | ||
<div className="mb-8"> | ||
<h2 className="text-2xl font-semibold">Choose how we use your data</h2> | ||
<p> | ||
Your data is important for helping improve and personalize HNG | ||
Boilerplate, and you have control over how it is used. You can change | ||
these settings anytime if you feel like playing a part in our | ||
development. <span className="underline">Learn more.</span> | ||
</p> | ||
</div> | ||
<ToggleSwitch | ||
label="Profile Visibility" | ||
description="Choose whether your profile is visible to everyone or just your contacts. Public profiles are viewable by all, making it easier to connect with new people. Private profiles are only visible to those you approve, giving you control over your information." | ||
apiEndpoint="/api/toggle-profile-visibility" | ||
/> | ||
<ToggleSwitch | ||
label="Share Data with Partners" | ||
description="Allow us to share your data with trusted partners for personalized promotions and offers. This helps us provide you with relevant content, discounts, and services tailored to your interests." | ||
apiEndpoint="/api/toggle-share-data" | ||
/> | ||
<ToggleSwitch | ||
label="Receive Email Updates" | ||
description="Opt in to receive updates on the latest features, exciting promotions, and important news directly to your email. Stay informed and take advantage of exclusive offers and updates designed to enhance your experience with us." | ||
apiEndpoint="/api/toggle-email-updates" | ||
/> | ||
<ToggleSwitch | ||
label="Enable Two-Factor Authentication" | ||
description="Enhance the security of your account by enabling Two-Factor Authentication (2FA). This feature adds an extra layer of protection by requiring not only your password but also a second form of verification, such as a code sent to your mobile device or generated by an authentication app. Enabling 2FA significantly reduces the risk of unauthorized access to your account, ensuring that only you can log in, even if someone else has your password." | ||
apiEndpoint="/api/toggle-2fa" | ||
/> | ||
<ToggleSwitch | ||
label="Use Data Encryption" | ||
description="Enable data encryption to protect your information from unauthorized access. By turning on this feature, all data transmitted between your device and our servers is encrypted, making it virtually impossible for hackers to intercept and read your data. This ensures that your personal information, including login credentials, messages, and other sensitive data, is kept secure and private." | ||
apiEndpoint="/api/toggle-encryption" | ||
/> | ||
<ToggleSwitch | ||
label="Allow Analytics" | ||
description="Enable third-party analytics services to help us gain insights into user behavior and improve our app's performance. By allowing these services, we can collect and analyze data on how you interact with the app, such as which features you use most, how you navigate through the interface, and where you might encounter issues. This information is crucial for us to identify trends, enhance user experience, and make data-driven decisions to optimize the app’s functionality and usability." | ||
apiEndpoint="/api/toggle-analytics" | ||
/> | ||
<ToggleSwitch | ||
label="Personalized Ads" | ||
description="Allow us to show you personalized ads based on your interests and browsing behavior. By enabling this feature, you consent to the use of data collected from your interactions within the app and across other platforms to deliver ads that are more relevant to you." | ||
apiEndpoint="/api/toggle-ads" | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default page; | ||
export default Page; |