Skip to content

Commit 4e026df

Browse files
committed
removed debugging logs, made website kinda responsive
Signed-off-by: alok8bb <alok8bb@gmail.com>
1 parent 0229186 commit 4e026df

File tree

5 files changed

+9
-14
lines changed

5 files changed

+9
-14
lines changed

src/BlockBack.sol

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,25 +112,20 @@ contract BlockBack is Ownable {
112112
}
113113

114114
function withdrawCampaign(uint256 _id) external payable {
115-
console.log(msg.sender);
116115
Campaign storage campaign = s_idToCampaign[_id];
117116
if (campaign.owner != msg.sender) {
118-
console.log("bruh");
119117
revert BlockBack__OnlyOwnerCanWithdraw();
120118
}
121119

122120
if (campaign.deadline > block.timestamp) {
123-
console.log("where?");
124121
revert BlockBack__DeadlineNotMet();
125122
}
126123

127124
campaign.status = CampaignStatus.Completed;
128125
s_campaigns[_id] = campaign;
129126

130-
console.log("here");
131127
payable(msg.sender).transfer(campaign.raisedAmount);
132128
emit CampaignWithrawn(_id, msg.sender);
133-
console.log("here");
134129
}
135130

136131
function withdraw() external onlyOwner {

website/src/app/campaign/[slug]/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ export default function CampaignPage({ params }: { params: { slug: string } }) {
8787
return (
8888
<>
8989
<Navbar />
90-
<div className="w-full flex justify-center items-center mt-10">
90+
<div className="w-full flex justify-center items-center md:mt-10">
9191
{campaign && (
92-
<div className="flex w-full mx-72 gap-10">
93-
<div className="w-2/3 flex flex-col gap-2">
92+
<div className="flex md:flex-row flex-col w-full lg:mx-30 xl:mx-72 gap-10">
93+
<div className="md:w-2/3 flex flex-col gap-2">
9494
<img
9595
src={SERVER_ENDPOINTS.getImage(campaign.imagePath)}
9696
className="w-full max-h-56 object-cover rounded-lg"
@@ -100,7 +100,7 @@ export default function CampaignPage({ params }: { params: { slug: string } }) {
100100
<h1 className="text-3xl font-semibold">{campaign.title}</h1>
101101
<p className="text-gray-400">{campaign.description}</p>
102102
</div>
103-
<div className="w-1/3 flex flex-col gap-5">
103+
<div className="md:w-1/3 flex flex-col gap-5">
104104
<div>
105105
{campaign.website && (
106106
<a

website/src/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default function RootLayout({
3333
return (
3434
<html lang="en">
3535
<body
36-
className={`${inter.variable} ${hankenGrotesk.variable} flex h-auto flex-col px-20 font-body pb-5`}
36+
className={`${inter.variable} ${hankenGrotesk.variable} flex h-auto flex-col px-5 md:px-20 font-body pb-5`}
3737
>
3838
<Toaster position="bottom-right" reverseOrder={false} />
3939
<WagmiProviderComp initialState={initialState}>

website/src/app/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export default function Home() {
8484
Finished
8585
</h1>
8686
</div>
87-
<div className="my-4 flex w-full gap-4">
87+
<div className="my-4 flex w-full gap-4 flex-col md:flex-row">
8888
{(isPending || serverError || error) && (
8989
<div className="h-full w-full flex items-center justify-center content-center py-40 text-xl">
9090
{isPending
@@ -113,7 +113,7 @@ export default function Home() {
113113
})
114114
.map((campaign, key) => (
115115
<div
116-
className="flex flex-col p-4 bg-magic-gray rounded-2xl w-1/3 gap-2 hover:cursor-pointer"
116+
className="flex flex-col p-4 bg-magic-gray rounded-2xl md:w-1/3 gap-2 hover:cursor-pointer"
117117
key={key}
118118
onClick={() => router.push(`/campaign/${campaign.id}`)}
119119
>

website/src/components/navbar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ import { MainIcon } from "./icons";
44

55
export default function Navbar() {
66
return (
7-
<nav className="flex justify-between p-10 font-sans items-center">
7+
<nav className="flex justify-between py-10 font-sans items-center">
88
<div className="flex flex-row items-center gap-4">
99
<MainIcon height={40} width={40} className={"fill-accent-500"} />
1010
<a href="/" className="text-3xl text-gray-100 font-bold tracking-wide">
1111
BlockBack
1212
</a>
1313
</div>
1414

15-
<div className="flex flex-row items-center gap-12 text-xl font-semibold text-gray-200 transition duration-300">
15+
<div className="hidden lg:flex flex-row items-center gap-12 text-xl font-semibold text-gray-200 transition duration-300">
1616
<a href="/manage" className="hover:text-accent-500">
1717
Manage Campaigns
1818
</a>

0 commit comments

Comments
 (0)