Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: updated live production #1562

Merged
merged 73 commits into from
Aug 25, 2024
Merged
Show file tree
Hide file tree
Changes from 68 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
858c206
fix: fix privacy policy and terms of use footer links
Chioma227 Aug 23, 2024
72b61d2
chore: remove 'compare all features' text from payment info page
Chioma227 Aug 23, 2024
e71ab8a
fix: fix toggle button to hide/show invite link
Chioma227 Aug 23, 2024
55ec21a
fix: add toggle icon for password visibility and fix text
harjibbolar26 Aug 23, 2024
7ef2299
fix: boilerplate logo, name and address in footer to match design
harjibbolar26 Aug 23, 2024
a02cbfb
fix: implement api integration to fetch and display blog posts
harjibbolar26 Aug 24, 2024
96a4fb8
fix: merge conflict
harjibbolar26 Aug 24, 2024
3ab7afc
feature:implement product text description area
Emmadegreat Aug 24, 2024
1b81185
feature: implemeted text area description
Emmadegreat Aug 24, 2024
2fcd128
feature:implemented product description text area
Emmadegreat Aug 24, 2024
82933fd
feature:implemented product description text area
Emmadegreat Aug 24, 2024
39aaeb6
feature: Implement Stock Management Table
Emmadegreat Aug 24, 2024
1c2a39d
feature: Implement Stock Management Table
Emmadegreat Aug 24, 2024
c6d8448
feature: Implement Stock Management Table
Emmadegreat Aug 24, 2024
725a7f1
Feat: implement delete members modal
Aug 24, 2024
ab8e1d8
feature:implemented adding a variant button
Emmadegreat Aug 24, 2024
8acd955
feature:implemented adding a variant button
Emmadegreat Aug 24, 2024
abbb599
feature:implemented availability dropdown
Emmadegreat Aug 24, 2024
6cefc5b
feature:implemented availability dropdown
Emmadegreat Aug 24, 2024
f746327
Fix: Fix Notifications list Margins with the submit button
seshto13 Aug 24, 2024
2a54789
Merge branch 'dev' into fix/notification-margin
seshto13 Aug 24, 2024
860a996
feature:implmentd product archive button
Emmadegreat Aug 24, 2024
8772da6
feature:implmentd product archive button
Emmadegreat Aug 24, 2024
c64c553
feature:implmentd product archive button
Emmadegreat Aug 24, 2024
e8a0d15
Fix: Remove Extra Login Text in Sign Up Page
seshto13 Aug 24, 2024
267e681
feature:implmentd product archive button
Emmadegreat Aug 24, 2024
e185fee
Merge branch 'dev' of https://github.com/hngprojects/hng_boilerplate_…
Emmadegreat Aug 24, 2024
46ff704
Merge branch 'dev' into fix/remove-extra-login-text
seshto13 Aug 24, 2024
a4742d6
feature: implemented product card
Emmadegreat Aug 24, 2024
e1d797c
fix: add router for terms and privacy in footer bottom
Muneerat Aug 23, 2024
cb25f6b
Fix update placeholder
Muneerat Aug 24, 2024
f7f8a3e
fix/update invite member modal title and dropdown
Muneerat Aug 24, 2024
2709a95
fix/link go to plans
Muneerat Aug 24, 2024
89ab9bd
feat: enhance create role form with validation and error handling
JoshuaAkpan Aug 24, 2024
e2108b0
fix: fix lint error by optimizing regex
JoshuaAkpan Aug 24, 2024
d9f0734
Fix: responsiveness and uniform alignment of waitlist page.
seshto13 Aug 23, 2024
ac44cfd
Fix: responsiveness and uniform alignment of waitlist page.
seshto13 Aug 24, 2024
9fed4ea
chore: fix Non-Functional-Terms-of-Service-and-Privacy-Policy-Links
Chioma227 Aug 23, 2024
7e9ff42
chore: remove duplicate contactUs from help-center
Chioma227 Aug 23, 2024
5b2012a
chore: bug fixes
PrudentBird Aug 23, 2024
86fb5bd
chore: resolve unhandled runtime errors and types
PrudentBird Aug 24, 2024
5a93f6c
chore: fixed test errors
PrudentBird Aug 24, 2024
a2a8ece
chore: fixed lint errors
PrudentBird Aug 24, 2024
2f1af46
Feat: implement DeleteMember modal
Aug 24, 2024
cec1675
Merge branch 'dev' into fix/remove-extra-login-text
seshto13 Aug 24, 2024
8d26e9d
Merge branch 'dev' into feat/HNG-Three-dotted-icon-on-active-member
Robinson-Taiwo Aug 24, 2024
280455f
feat: implement product card delete button
Emmadegreat Aug 24, 2024
1206257
Merge branch 'dev' into fix/toggle-invite-link-visibility
incredible-phoenix246 Aug 24, 2024
5655d6a
Merge pull request #1314 from Chioma227/fix/toggle-invite-link-visibi…
incredible-phoenix246 Aug 24, 2024
7e86776
Merge branch 'dev' into feat/HNG-Three-dotted-icon-on-active-member
incredible-phoenix246 Aug 24, 2024
77d188d
error fixed
Emmadegreat Aug 24, 2024
775bb11
git statusMerge remote-tracking branch 'upstream/dev' into fix/select…
harjibbolar26 Aug 24, 2024
aa9eb9f
fix: update branch
harjibbolar26 Aug 24, 2024
1442e33
Merge pull request #1546 from Robinson-Taiwo/feat/HNG-Three-dotted-ic…
incredible-phoenix246 Aug 24, 2024
d54a60f
Merge remote-tracking branch 'upstream/dev' into fix/data-privacy-but…
harjibbolar26 Aug 24, 2024
29959c9
fix: buttons for data-and-privary page
harjibbolar26 Aug 24, 2024
75fd531
Merge pull request #1555 from harjibbolar26/fix/data-privacy-buttons
incredible-phoenix246 Aug 25, 2024
5e00f47
Merge branch 'dev' into delete-button
olika-ashley Aug 25, 2024
bb999d1
Merge branch 'dev' into fix/remove-extra-login-text
incredible-phoenix246 Aug 25, 2024
e114e25
Merge pull request #1545 from hngprojects/delete-button
incredible-phoenix246 Aug 25, 2024
503fb29
Merge branch 'dev' into fix/remove-extra-login-text
incredible-phoenix246 Aug 25, 2024
98acea2
Merge branch 'dev' into fix/notification-margin
incredible-phoenix246 Aug 25, 2024
cbacb79
Merge pull request #1514 from seshto13/fix/remove-extra-login-text
incredible-phoenix246 Aug 25, 2024
0628896
Merge branch 'dev' into fix/notification-margin
incredible-phoenix246 Aug 25, 2024
22fa81e
Merge pull request #1500 from seshto13/fix/notification-margin
incredible-phoenix246 Aug 25, 2024
96bd04a
chore: added video markerters page
incredible-phoenix246 Aug 25, 2024
d44acdf
chore: added video markerters page
incredible-phoenix246 Aug 25, 2024
af7f56f
Merge pull request #1560 from hngprojects/feat/marketing-video
incredible-phoenix246 Aug 25, 2024
219369c
chore: updated video to auto play
incredible-phoenix246 Aug 25, 2024
369c092
chore: updated video to auto play
incredible-phoenix246 Aug 25, 2024
f462333
Merge branch 'dev' into feat/marketing-video
incredible-phoenix246 Aug 25, 2024
69811e2
Merge branch 'feat/marketing-video' of github.com:hngprojects/hng_boi…
incredible-phoenix246 Aug 25, 2024
2310a7b
Merge pull request #1563 from hngprojects/feat/marketing-video
Ravencodess Aug 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"react-email": "2.1.5",
"react-hook-form": "^7.52.2",
"react-paginate": "^8.2.0",
"react-toastify": "^10.0.5",
"recharts": "^2.12.7",
"sharp": "^0.33.4",
"swiper": "^11.1.9",
Expand Down
15 changes: 15 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added public/images/productimage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion public/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"otpExpiresIn": "OTP expires in: {timeLeft}",
"resendCode": "Didn't receive the code? resend",
"dataProcessing": "We would process your data as set forth in our Terms of Use, Privacy Policy and Data Processing Agreement",
"alreadyHaveAccount": "Already Have An Account? Login"
"alreadyHaveAccount": "Already Have An Account?"
},
"HomePage": {
"title": "Hello world!"
Expand Down Expand Up @@ -153,6 +153,7 @@
},
"noJobs": {
"noJobsTitle": "No available Jobs at the moment",

"noJobsContent": "Sign up for our newsletter to get updates on job postings",
"modalTitle": "Newsletter",
"button": "Sign up for newsletter",
Expand Down
48 changes: 48 additions & 0 deletions src/app/(landing-routes)/blog/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,62 @@
"use client";

import axios from "axios";
import { useSession } from "next-auth/react";
import { useRouter } from "next/navigation";
import { useEffect, useState } from "react";

import { getApiUrl } from "~/actions/getApiUrl";
import CustomButton from "~/components/common/common-button/common-button";
import HeroSection from "~/components/extDynamicPages/blogCollection/BlogPageHero";
import BlogCard from "~/components/layouts/BlogCards";
import { useToast } from "~/components/ui/use-toast";
import { blogPosts } from "./data/mock";

const BlogHome = () => {
const router = useRouter();
const { toast } = useToast();
const { data: session } = useSession();
const [, setBlogPost] = useState("");

useEffect(() => {
async function fetchBlog() {
try {
const apiUrl = await getApiUrl();
const token = session?.access_token;
const response = await axios.get(`${apiUrl}/api/v1/blogs`, {
headers: {
Authorization: `Bearer: ${token}`,
},
});
const data = response.data;
setBlogPost(data);
toast({
title:
Array.isArray(data.data) && data.data.length === 0
? "No Blog Post Available"
: "Blog Posts Retrieved",
description:
Array.isArray(data.data) && data.data.length === 0
? "Blog posts are empty"
: "Blog posts retrieved successfully",
variant:
Array.isArray(data.data) && data.data.length === 0
? "destructive"
: "default",
});
} catch (error) {
toast({
title: "Error occured",
description:
error instanceof Error
? error.message
: "An unknown error occurred",
variant: "destructive",
});
}
}
fetchBlog();
}, [session?.access_token, toast]);

return (
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import { useState } from "react";

import CustomButton from "~/components/common/common-button/common-button";

interface ToggleSwitchProperties {
label: string;
description: string;
Expand All @@ -21,7 +23,7 @@ const ToggleSwitch: React.FC<ToggleSwitchProperties> = ({
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="text-2xl font-semibold">{label}</label>
<label className="relative inline-block h-8 w-14">
<input
type="checkbox"
Expand Down Expand Up @@ -94,6 +96,14 @@ const Page = () => {
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 className="mt-6 flex items-center justify-between gap-3 sm:justify-end">
<CustomButton variant="outline" className="font-[500] max-sm:w-full">
Cancel
</CustomButton>
<CustomButton variant="primary" className="font-[500] max-sm:w-full">
Save Changes
</CustomButton>
</div>
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const NotificationPage = () => {
};

return (
<main className="text-neutral-dark-2">
<main className="px-4 text-neutral-dark-2">
<div className="mx-[24px] mb-[30px] flex w-fit items-center gap-1 md:hidden">
<ChevronLeft size="18" className="text-muted-foreground" />
<span className="font-[600] text-muted-foreground">Notification</span>
Expand Down Expand Up @@ -178,7 +178,7 @@ const NotificationPage = () => {
/>
</section>
</section>
<section className="text-center md:text-end">
<section className="text-end">
<CustomButton
variant="primary"
icon={<Check />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ import { useState } from "react";
import CustomButton from "~/components/common/common-button/common-button";
import { Input } from "~/components/common/input";
import InviteMemberModal from "~/components/common/modals/invite-member";
import DeleteMember from "~/components/common/modals/invite-member/DeleteMembers";
import LoadingSpinner from "~/components/miscellaneous/loading-spinner";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "~/components/ui/dropdown-menu";
import {
Select,
SelectContent,
Expand Down Expand Up @@ -71,8 +78,15 @@ const activeMembers: number = memberData.length;

const Members = () => {
const [isModalOpen, setIsModalOpen] = useState(false);
const [isDeleteModalOpen, setIsDeleteModalOpen] = useState(false);

const [exporting, setExporting] = useState(false);
const [text, setText] = useState("Export CSV");
const [isVisible, setIsVisible] = useState<boolean>(false);

const toggleVisibility = () => {
setIsVisible(!isVisible);
};

const { toast } = useToast();
const handleCopy = () => {
Expand All @@ -87,10 +101,18 @@ const Members = () => {
setIsModalOpen(true);
};

const handleDeleteOpen = () => {
setIsDeleteModalOpen(true);
};

const handleModalClose = () => {
setIsModalOpen(false);
};

const handleDeleteClose = () => {
setIsDeleteModalOpen(false);
};

const exportMembers = async () => {
setExporting(true);
setText("Exporting...");
Expand Down Expand Up @@ -160,25 +182,28 @@ const Members = () => {
<input
type="checkbox"
className="peer sr-only"
onChange={() => {}}
onChange={toggleVisibility}
checked={isVisible}
/>
<div className="peer h-6 w-11 rounded-full bg-gray-200 after:absolute after:left-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:border after:border-gray-300 after:bg-white after:transition-all after:content-[''] peer-checked:bg-orange-600 peer-checked:after:translate-x-full peer-checked:after:border-white peer-focus:ring-4 peer-focus:ring-orange-300 dark:border-gray-600 dark:bg-gray-700 dark:peer-focus:ring-orange-800"></div>
</label>
</div>
</div>

<div className="flex w-full justify-between">
<CustomButton variant="outline" className="w-full overflow-hidden">
https://www.figma.com/design/7hCSTNzQOJLl9aww6wEEd1/Managing-Users----Team-Learn-AI?node-i
</CustomButton>
<CustomButton
variant="primary"
className="ml-8 space-x-4"
onClick={handleCopy}
>
Copy link
</CustomButton>
</div>
{isVisible && (
<div className="flex w-full justify-between">
<CustomButton variant="outline" className="w-full overflow-hidden">
https://www.figma.com/design/7hCSTNzQOJLl9aww6wEEd1/Managing-Users----Team-Learn-AI?node-i
</CustomButton>
<CustomButton
variant="primary"
className="ml-8 space-x-4"
onClick={handleCopy}
>
Copy link
</CustomButton>
</div>
)}
</div>
<div className="w-full space-y-2">
<h4 className="text-lg font-medium">Manage members</h4>
Expand Down Expand Up @@ -246,7 +271,19 @@ const Members = () => {
</Select>
</div>

<EllipsisIcon onClick={() => {}} className="flex-shrink-0" />
<DropdownMenu>
<DropdownMenuTrigger>
<EllipsisIcon
onClick={() => {}}
className="flex-shrink-0"
/>
</DropdownMenuTrigger>
<DropdownMenuContent className="w-[7.875rem] text-[0.875rem]">
<DropdownMenuItem onClick={handleDeleteOpen}>
<span>Delete Member</span>
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</li>
);
})}
Expand Down Expand Up @@ -276,6 +313,7 @@ const Members = () => {
</div>
</div>
<InviteMemberModal show={isModalOpen} onClose={handleModalClose} />
<DeleteMember show={isDeleteModalOpen} onClose={handleDeleteClose} />
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,6 @@ const PaymentInformation = () => {
</div>
</div>
</div>

<div className="max-w-[1000px]">
<p>Compare all features</p>
</div>
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const page = () => {
return <div>page</div>;
};

export default page;
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// components/admin/NewProductModal.tsx

import { zodResolver } from "@hookform/resolvers/zod";
import { AnimatePresence, motion } from "framer-motion";
import { Loader, X } from "lucide-react";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import { AnimatePresence, motion } from "framer-motion";
import { Loader2, X } from "lucide-react";
import { useSession } from "next-auth/react";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
"use client";

import Image, { StaticImageData } from "next/image";

interface ProductCardProperties {
title: string;
price: string;
description: string;
inStock: boolean;
imageUrl: string | StaticImageData;
}

const Delete = () => {
alert("Are you sure you want to delete");
};

const Edit = () => {
alert("Proceed to edit");
};

const ProductCard: React.FC<ProductCardProperties> = ({
title,
price,
description,
inStock,
imageUrl,
}) => {
return (
<div className="max-w-sm overflow-hidden rounded-md border-[1px] border-[#D9D9D9] bg-white p-3 shadow-md">
<Image
src={imageUrl}
alt={title}
width={400}
height={300}
className="h-48 w-full rounded-md object-cover"
/>
<div className="p-4">
<div className="flex items-center justify-between">
<h2 className="text-xl font-bold">{title}</h2>
<p className="mt-1 text-[20px] font-bold text-gray-900">{price}</p>
</div>
<p className="mb-4 text-base text-gray-700">{description}</p>
<span
className={`mt-3 px-5 py-2 text-sm ${inStock ? "rounded-full bg-[#E7F7E9] text-green-500" : "bg-[#FDE7E7] text-red-500"}`}
>
{inStock ? "In stock" : "Out of stock"}
</span>
<div className="mt-6 flex justify-between space-x-2">
<button
onClick={Edit}
className="w-[130px] rounded-md border-[1px] px-4 py-2 text-black"
>
Edit
</button>
<button
onClick={Delete}
className="w-[130px] rounded-md border-[1px] bg-white px-4 py-2 text-[#DC2626]"
>
Delete
</button>
</div>
</div>
</div>
);
};

export default ProductCard;
Loading
Loading